dillon1000/react
Commit
Browse files Allow returning null as host context (#9278)
If your renderer doesn't use host context, you might prefer to return null. This used to give an error: > Invariant Violation: Expected host context to exist. This error is likely caused by a bug in React. Please file an issue. I use a sentinel value instead now. The code in ReactFiberHostContext is a little complicated now. We could probably also just remove the invariants.
Changed paths3 files
First-parent comparisonscripts/fiber/tests-passing.txt ModifiedM src/renderers/shared/fiber/ReactFiberHostContext.js ModifiedA src/renderers/shared/fiber/__tests__/ReactFiberHostContext-test.js AddedPatch
Files changed
Rendering syntax-highlighted changes…