purescript-react/purescript-react-basic-hooks

Add new hooks (for React v18)

pete-murphy opened this issue · 3 comments

With the update to React v18, there are some new hooks that aren't yet implemented in this library:

  • useId
  • useTransition
  • useDeferredValue
  • useSyncExternalStore
  • useInsertionEffect

The latter two are "intended to be used by libraries, not application code." I'd be happy to look into implementing these and adding tests if that's desirable.

that'd be awesome, i'm about to move and probably won't have time to attempt it myself until july or later

@ptrfrncsmrph Sorry, I didn't read all the way until the end of your comment to see that you wanted to implement these.

No problem! I was a bit stumped with how to go about useSyncExternalStore and useInsertionEffect to be honest, still haven't used any of the React 18 stuff...