[Feature Request] - Make joinRoom and makeAction suitable for use as React Hooks.
rogersanick opened this issue · comments
Nick Rogers commented
Make joinRoom and makeAction idempotent so that they can be used as React hooks!
Tails commented
This should be relatively well-doable. Create some custom hooks with the makeAction() code: https://react.dev/learn/reusing-logic-with-custom-hooks
And include a closure variable that checks if the function with the same parameters has already been called for a specific peerId.
Dan Motzenbecker commented
Now supported in 0.15.0, see: https://github.com/dmotz/trystero#react-hooks