Form instance
Makes what the server renders agree with the client render that hydrates it:
useId() to the form's Form.stableId, which the
stable ids of its fields build on. On unmount, it gives the form its own id back, unless
something else has assigned another in the meantime, so a form that outlives the component
doesn't keep an id tied to it.Call it at the top of each component that renders a form, before any bind* call.
It covers that form only: a sub-form rendered by its own component calls it for itself,
so no component has to know what its ancestors did.
Harmless in a client-rendered app, so shared components can call it unconditionally. Anything it takes care of in the future has to keep it that way.
Prepare the form for server-side rendering