dillon1000/react

Commit

[CS] Implement Some Stuff (#11390)

* Implement CS first take

This is using a pure JS API. This should probably switch to native hooks
at some later point but I'll start ironing out issues at this level first.

* Use async scheduling by default

The scheduled callback gets called immediately in render with infinite
time for now. Later this will be per root and abortable.

* Fix up the type signature of the ReactNativeCSType export

* Add escape hatch for special cased children

Working around the fact that we can't map arbitrary children slots. Just
the "children" prop.

* Readd providesModule for ReactNativeCSTypes

* Fix lint

* Fix ReactNativeTypes providesModule and CI check

* Special case a parent instance that doesn't have a props object

CSCustom can be anything here. Ugly but whatevs.

* Don't forget to store stateUpdater so that we can trigger updates

* Fix test
Browse files
Changed paths8 files
First-parent comparison
M packages/react-cs-renderer/src/ReactNativeCS.js ModifiedM packages/react-cs-renderer/src/ReactNativeCSTypes.js ModifiedA packages/react-cs-renderer/src/__mocks__/CSStatefulComponent.js AddedM packages/react-cs-renderer/src/__tests__/ReactNativeCS-test.js ModifiedM packages/react-native-renderer/src/ReactNativeTypes.js ModifiedM scripts/circleci/check_modules.sh ModifiedM scripts/flow/react-native-host-hooks.js ModifiedM scripts/rollup/bundles.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…