matterandvoid-space / subscriptions

A subscriptions library over a source of data (forked + extracted from re-frame)
Other
50 stars 1 forks source link

Add use-context helper for react hooks #2

Closed dvingo closed 2 years ago

dvingo commented 2 years ago

Pass the state that use-sub accesses via the context api - probably add a new namespace (.react-hook-context?) with the hooks to do this (called a provider in redux). Otherwise you have to pass the global state atom via props down the tree.