Shared API is exposed in @paretojs/core
.
useStyles is used to collect critical CSS, for example:
promiseMap is used to manage the promise status of requests, and it is isomorphic between the server and the client.
mockClientPromise is used to initialize the promise status on the client side.
use is a polyfill. In a React 19
environment, it will directly use the use exported by React 19
. In React 18
, it will fallback to the polyfill defined in pareto. Note that the polyfill use can only be used to resolve promises.