Skip to content

Commit

Permalink
Support sharing context objects between concurrent renderers (#12779)
Browse files Browse the repository at this point in the history
* Support concurrent primary and secondary renderers.

As a workaround to support multiple concurrent renderers, we categorize
some renderers as primary and others as secondary. We only expect
there to be two concurrent renderers at most: React Native (primary) and
Fabric (secondary); React DOM (primary) and React ART (secondary).
Secondary renderers store their context values on separate fields.

* Add back concurrent renderer warning

Only warn for two concurrent primary or two concurrent secondary renderers.

* Change "_secondary" suffix to "2"

#EveryBitCounts
  • Loading branch information
acdlite authored May 11, 2018
1 parent 760262e commit 2013ad2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ReactTestRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ const TestRenderer = ReactFiberReconciler({
// Even after the reconciler has initialized and read host config values.
now: () => nowImplementation(),

isPrimaryRenderer: true,

mutation: {
commitUpdate(
instance: Instance,
Expand Down

0 comments on commit 2013ad2

Please sign in to comment.