OneForm icon indicating copy to clipboard operation
OneForm copied to clipboard

[TODO] Change how custom hooks listen for changes

Open Sawtaytoes opened this issue 2 years ago • 1 comments

Currently, OneForm uses refs to get functions in change handlers embedded into props passed to hooks.

We need to change that so the hook itself returns a subscriber function that goes in a useEffect. That will clear up the problem of needing methods before they're defined.

The change is absolutely required for concurrent mode.

Any loose ref assignments should also be encapsulated in useEffect.

Sawtaytoes avatar Sep 07 '21 20:09 Sawtaytoes