Files
react/packages/react-call-return
Andrew Clark b77b12311f Call and Return components should use ReactElement (#11834)
* Call and Return components should use ReactElement

ReactChildFiber contains lots of branches that do the same thing for
different child types. We can unify them by having more child types be
ReactElements. This requires that the `type` and `key` fields are
sufficient to determine the identity of the child.

The main benefit is decreased file size, especially as we add more
component types, like context providers and consumers.

This updates Call and Return components to use ReactElement. Portals are
left alone for now because their identity includes the host instance.

* Move server render invariant for call and return types

* Sort ReactElement type checks by most likely

* Performance timeline should skip over call components

Don't think these were intentionally omitted from the blacklist of
component types.

I went ahead and updated getComponentName to include special types, even
though I don't think they're used anywhere right now.

* Remove surrounding brackets from internal display names
2017-12-12 15:04:40 -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.