react/packages/react-server
Andrew Clark 7028ce7456
experimental_use(promise) for Server Components (#25207)
Follow up to #25084. Implements experimental_use(promise) API in 
the Server Components runtime (Flight).

The implementation is much simpler than in Fiber because there is no
state. Even the "state" added in this PR — to track the result of each
promise across attempts — is reset as soon as a component 
successfully renders without suspending.

There are also fewer caveats around neglecting to cache a promise
because the state of the promises is preserved even if we switch to a
different task.

Server Components is the primary runtime where this API is intended to
be used.

The last runtime where we need to implement this is the server renderer
(Fizz).
2022-09-07 22:27:04 -04:00
..
npm Remove Blocks (#20138) 2020-10-30 23:03:45 -07:00
src experimental_use(promise) for Server Components (#25207) 2022-09-07 22:27:04 -04:00
README.md Add Experimental Flight Infrastructure (#16398) 2019-10-29 14:45:47 -07:00
flight.js Refactor Host Config Infra (getting rid of .inline*.js) (#18240) 2020-03-06 16:20:42 -08:00
index.js Add Relay Flight Build (#18242) 2020-03-07 11:23:30 -08:00
package.json Remove object-assign polyfill (#23351) 2022-02-23 19:34:24 -05:00

README.md

react-server

This is an experimental package for creating custom React streaming server renderers.

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.