Since revising the concept of an "atom" in Zedux to mean "atom instance" instead of "atom template", the AtomInstanceProvider component is unnecessarily verbose. AtomProvider now means the same thing and looks so much cleaner.
We are keeping the word instance in most APIs to avoid confusion, but it isn't necessary here since AtomProvider has a required instance or instances prop.
Breaking Change
This is a breaking change - the component has been renamed. Import and use AtomProvider now:
- import { AtomInstanceProvider } from '@zedux/react' // before
+ import { AtomProvider } from '@zedux/react' // after
- <AtomInstanceProvider instance={instance}><Child /></AtomInstanceProvider> // before
+ <AtomProvider instance={instance}><Child /></AtomProvider> // after
Description
Since revising the concept of an "atom" in Zedux to mean "atom instance" instead of "atom template", the
AtomInstanceProvider
component is unnecessarily verbose.AtomProvider
now means the same thing and looks so much cleaner.We are keeping the word
instance
in most APIs to avoid confusion, but it isn't necessary here sinceAtomProvider
has a requiredinstance
orinstances
prop.Breaking Change
This is a breaking change - the component has been renamed. Import and use
AtomProvider
now: