Files
react/packages/react-call-return
Brian Vaughn d3b183c323 Debug render-phase side effects in "strict" mode (#12094)
A new feature flag has been added, debugRenderPhaseSideEffectsForStrictMode. When enabled, StrictMode subtrees will also double-invoke lifecycles in the same way as debugRenderPhaseSideEffects.

By default, this flag is enabled for __DEV__ only. Internally we can toggle it with a GK.

This breaks several of our incremental tests which make use of the noop-renderer. Updating the tests to account for the double-rendering in development mode makes them significantly more complicated. The most straight forward fix for this will be to convert them to be run as internal tests only. I believe this is reasonable since we are the only people making use of the noop renderer.
2018-01-25 14:30:53 -08:00
..
2017-11-03 00:47:54 +00:00

react-call-return

This is an experimental package for multi-pass rendering in React.

Its API is not as stable as that of React, React Native, or React DOM, and does not follow the common versioning scheme.

Use it at your own risk.

No, Really, It Is Unstable

This is an experiment.

We will replace this with a different API in the future.
It can break between patch versions of React.

We also know that it has bugs.

Don't rely on this for anything except experiments.
Even in experiments, make sure to lock the versions so that an update doesn't break your app.

Don't publish third party components relying on this unless you clearly mark them as experimental too.
They will break.

Have fun! Let us know if you find interesting use cases for it.

API

See the test case in src/__tests__/ReactCallReturn.js for an example.

What and Why

The API is not very intuitive right now, but this is a good overview of why it might be useful in some cases. We are very open to better API ideas for this concept.