Last active
May 4, 2016 19:29
-
-
Save sebmarkbage/b6f7a9c4bdec1c41cb64e7ee77254551 to your computer and use it in GitHub Desktop.
Continued React Native Decoupling Work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
React Native Decoupling | |
-- ONLY REQUIRED FOR PACKAGING PURPOSES (should be handled by the environment) -- | |
InitializeJavaScriptAppEngine | |
-- MOVEABLE TO FBJS OR REACT OR STOP USING -- | |
deepFreezeAndThrowOnMutationInDev | |
- Deep-anything in JS is bad. This is really only needed for structures that we don't know about. I.e. missing attribute configurations. It is unfortunate for other optimizations and auto-marshalling. Perhaps we should require attribute configs or at least pick a more restricted default than one that easily over freezes or causes infinite loops. | |
deepDiffer | |
- Consider replacing with a more restricted default that isn't arbitrarily deep and recursive. It generally doesn't need to be. | |
-- MOVABLE INTO REACT -- | |
flattenStyle | |
- This is used as a pseudo-public API to read from the .style property kind of like React.Children. Should probably be exposed in a similar way by React if we want to keep the nested data structures. | |
NOTE: Maybe StyleSheet.create should move into React except validation currently | |
can't move for environment specific reasons. It's global validation just | |
like HTML node validation. We could move the create part into React and | |
wrap it in a validator in React Native. | |
-- ESSENTIAL PLATFORM HOOKS -- | |
UIManager | |
- This is the primary target API. Ideally we should have no other dependencies than this. | |
TextInputState | |
- Consider moving to a separate static methods library closer to the just the things that are "focusable". | |
- Can this move to UIManager? | |
RCTEventEmitter | |
- We need to register ourselves with the event emitter as soon as possible just like React DOM register itself with the document.body listeners. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment