Zedux using the word Consumer instead of Context is an unnecessary discrepancy between Zedux's API and React's. Rename useAtomConsumer to useAtomContext.
Also update all docs and tests.
Breaking Change
This is a breaking change. Import and use useAtomContext instead of useAtomConsumer now:
- import { useAtomConsumer } from '@zedux/react' // before
+ import { useAtomContext } from '@zedux/react' // after
- const instance = useAtomConsumer(myAtom) // before
+ const instance = useAtomContext(myAtom) // after
Description
Zedux using the word
Consumer
instead ofContext
is an unnecessary discrepancy between Zedux's API and React's. RenameuseAtomConsumer
touseAtomContext
.Also update all docs and tests.
Breaking Change
This is a breaking change. Import and use
useAtomContext
instead ofuseAtomConsumer
now: