-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backout: Components with custom state
Summary: This is the first diffs that backs out the Custom Native State from the Codegen. The reason why we are backing it out are: 1. It forces users to create new types in JS that are not ctually used there. For example, the NativeState you define, and eventually exports, in JS is not used anywhere in your JS code. 2. You need to put in the JS native state some types that does not exists in JS, only to have them generated by the Codegen. ImageRequest, for example, does not exists in JS, but you need it in your (iOS) state to load images 3. There are a lot of edge cases due to how C++ handles variables. Some variables needs to be created as pointers. Some others as `const &`. It does not scale to hard code all of them and there is the risk to have the same type that needs to be a pointer in some case and something else in others. 4. It is better to instruct the users on how to properly create a component with Custom State, Shadow Node and Descriptor. ## Changelog [General][Removed] - Back out components with native state in RNTester Reviewed By: cortinico Differential Revision: D40419254 fbshipit-source-id: 1895c7050f01f76a8901a97e9700f74cae707b79
- Loading branch information
1 parent
f6cfcc3
commit aace662
Showing
19 changed files
with
3 additions
and
632 deletions.
There are no files selected for viewing
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
38 changes: 0 additions & 38 deletions
38
packages/rn-tester/NativeComponentWithState/NativeComponentWithState.podspec
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
...ester/NativeComponentWithState/cxx/RNTNativeComponentWithStateCustomComponentDescriptor.h
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
...es/rn-tester/NativeComponentWithState/cxx/RNTNativeComponentWithStateCustomShadowNode.cpp
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
...ages/rn-tester/NativeComponentWithState/cxx/RNTNativeComponentWithStateCustomShadowNode.h
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
packages/rn-tester/NativeComponentWithState/ios/RNTNativeComponentWithStateView.h
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.