dillon1000/react

Commit

[RT] More predictable things (#11139)

* Inject the right event emitter

Previously this was injecting the ReactNativeEventEmitter even though
we want the ReactNativeRTEventEmitter.

RCTEventEmitter is also just an abstraction around BatchedBridge that
registers a single name. We can't register more than one with it. Removed
that abstraction for now so we don't have to add it back into the RN repo.

* Unify appendChildToDetachedParent and appendChild, separate root

Merge appendChildToDetachedParent and appendChild. We don't need the distinction.

We do however need a separate notion for the root container.
Calling this `appendChildToContext` since Context has a meaning here.

* Add a simple shallow comparison so that we don't send updates for equal props

This still sends all props if any differs. Not sure we'll want that but I
think so.

* Add BatchedBridge to bundle externals

* Lint
Browse files
Changed paths8 files
First-parent comparison
M flow/react-native-host-hooks.js ModifiedM scripts/rollup/bundles.js ModifiedA src/__mocks__/BatchedBridge.js AddedM src/__mocks__/RTManager.js ModifiedM src/renderers/native-rt/ReactNativeRTEventEmitter.js ModifiedM src/renderers/native-rt/ReactNativeRTFiberEntry.js ModifiedM src/renderers/native-rt/ReactNativeRTFiberRenderer.js ModifiedM src/renderers/native-rt/__tests__/ReactNativeRT-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…