This version introduces a new feature atomWithLazy and deprecates useReducerAtom and freezeAtomCreator. It also introduces an experimental store implementation in jotai/experimental.
Migration Guide
selectAtom
selectAtom will no longer internally unwrap promises. To migrate to the new api, use the unwrap utility from jotai/utils package.
// suppose we have this
const baseAtom = atom(Promise.resolve({ id: 0, name: 'test' }))
// instead, you need to import unwrap from 'jotai/utils' and pass the unwrapped atom
import { unwrap } from 'jotai/utils'
...
const idAtom = selectAtom(
unwrap(baseAtom),
({ name }) => name,
(prev, curr) => prev.id === curr.id
)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps jotai from 2.7.2 to 2.8.0.
Release notes
Sourced from jotai's releases.
Commits
1b4eb45
2.8.02d2f03a
fix(utils): dev-only deprecation message (#2491)a3be09e
fix(store): remove dev3 methods and add dev4 methods only in store2 (#2484)88303ac
add memory leak test (#2487)2abd51c
deprecate freezeAtomCreator (#2490)93a28f4
fix(vanilla): setters do not freeze new values (#2476)2ca8339
chore: old ts versions to test in ci (#2489)c09843a
chore(deps): update dev dependencies (#2479)93a6fb9
refactor atomWithLazy (#2485)1049ae1
docs: fix some typos (#2483)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show