react/packages/react-server/src
Andrew Clark 4729ff6d1f
Implement identifierPrefix option for useId (#22855)
When an `identifierPrefix` option is given, React will add it to the
beginning of ids generated by `useId`.

The main use case is to avoid conflicts when there are multiple React
roots on a single page.

The server API already supported an `identifierPrefix` option. It's not
only used by `useId`, but also for React-generated ids that are used to
stitch together chunks of HTML, among other things. I added a
corresponding option to the client.

You must pass the same prefix option to both the server and client.
Eventually we may make this automatic by sending the prefix from the
server as part of the HTML stream.
2021-12-02 17:49:43 -08:00
..
__tests__ Basic Fizz Architecture (#20970) 2021-03-11 12:01:41 -08:00
forks Implement identifierPrefix option for useId (#22855) 2021-12-02 17:49:43 -08:00
ReactFizzClassComponent.js [Fizz] Minor Fixes for Warning Parity (#21618) 2021-06-03 19:54:31 -04:00
ReactFizzComponentStack.js [Fizz] Implement Component Stacks in DEV for warnings (#21610) 2021-06-03 13:02:41 -07:00
ReactFizzContext.js [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
ReactFizzHooks.js Implement identifierPrefix option for useId (#22855) 2021-12-02 17:49:43 -08:00
ReactFizzNewContext.js [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
ReactFizzServer.js useId (#22644) 2021-11-01 13:30:44 -07:00
ReactFizzTreeContext.js fix typos (#22715) 2021-11-15 10:58:21 -05:00
ReactFlightServer.js Remove experimental useOpaqueIdentifier API (#22672) 2021-11-01 15:02:39 -07:00
ReactFlightServerBundlerConfigCustom.js Dedupe module id generation (#20172) 2020-11-10 19:58:58 -08:00
ReactFlightServerConfig.js [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
ReactFlightServerConfigStream.js [Flight] Add global onError handler (#21129) 2021-03-29 19:36:16 -07:00
ReactServerFormatConfig.js [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
ReactServerStreamConfig.js [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
ReactServerStreamConfigBrowser.js [Fizz] Implement Legacy renderToString and renderToNodeStream on top of Fizz (#21276) 2021-06-14 12:54:30 -07:00
ReactServerStreamConfigNode.js [Fizz] Implement Legacy renderToString and renderToNodeStream on top of Fizz (#21276) 2021-06-14 12:54:30 -07:00