Releases: pmndrs/jotai
v1.7.4
There was a regression in v1.7.3 with TypeScript, which should be fixed in this version.
What's Changed
- fix(types): can not export atoms by @u3u in #1260
- fix(xstate): atomWithMachine typescript error after updating xstate to version 4.29.0 by @jahglow in #1274
New Contributors
- @sepehr-safari made their first contribution in #1269
- @u3u made their first contribution in #1260
- @jahglow made their first contribution in #1274
Full Changelog: v1.7.3...v1.7.4
v1.7.3
v1.7.2
v1.7.1
This fixes a few bugs. We hope to increase the compatibility with start/useTransition. Reporting issues is welcome.
What's Changed
- fix(core): can update normal atom with useTransition by @dai-shi in #1154
- fix(utils): does not throw with an empty list to waitForAll by @dai-shi in #1181
New Contributors
- @AjaxSolutions made their first contribution in #1188
Full Changelog: v1.7.0...v1.7.1
v1.7.0
Prior to this version, Provider catches all atoms for useDebugValue in development mode for React DevTools. One issue is that you can’t disable this behavior. The other limitation is this doesn’t work with provider-less mode. To this end, we expose a new hook useAtomsDebugValue
and remove the feature from Provider. Migration is required if you are using Provider and React DevTools to see atom values in development mode.
Migration Guide
Previously, if you use <Provider>
, useDebugValue
is automatically used in the dev mode and you can never disable it.
import { Provider } from 'jotai'
const Root = () => (
<Provider>
<App />
</Provider>
}
Now, to get the same behavior, you need to use the useAtomsDebugValue
explicitly.
import { Provider } from 'jotai'
import { useAtomsDebugValue } from 'jotai/devtools'
const DebugAtoms = () => {
useAtomsDebugValue()
return null
}
const Root = () => (
<Provider>
<DebugAtoms />
<App />
</Provider>
}
What's Changed
- fix(utils): fix memory leaks and other issues in atomWithObservable by @TobiasWalle in #1170
- refactor(urql): atomWithQuery with fixing tests by @dai-shi in #1179
- feat(devtools): expose useAtomsDebugValue from jotai/devtools by @dai-shi in #1184
Full Changelog: v1.6.7...v1.7.0
v1.6.7
React 18 behaves slightly differently from React 17 and some people reported extra re-renders. While extra re-renders without commits are expected, we improved it with early bail out. Now, primitive atoms won't re-render with the same value. Derived atoms can still re-render without commits, but it's intentional.
What's Changed
- fix(utils): atomWithObservable: fix ReferenceError with BehaviourSubject (#1156) by @TobiasWalle in #1157
- fix(core): do not re-render if value is the same by @dai-shi in #1159
New Contributors
- @TobiasWalle made their first contribution in #1157
- @TwistedMinda made their first contribution in #1168
Full Changelog: v1.6.6...v1.6.7
v1.6.6
This improves core behavior with React 18. We are not 100% sure if this change could cause any issues with old versions. (Our tests passed, but there could be some missing tests. Contributions are welcome.)
What's Changed
- fix(core): improve re-render behavior with useTransition by @dai-shi in #1139
- refactor(devtools): internal useAtomsDevtools code by @dai-shi in #1138
- fix(urql): atomWithQuery: improve isOperationResultWithData to avoid
undefined
in case of error by @svilen-ivanov in #1130
New Contributors
- @macarie made their first contribution in #1142
- @svilen-ivanov made their first contribution in #1130
Full Changelog: v1.6.5...v1.6.6
v1.6.5
This reverts #1089 which was introduced in v1.6.3, which can behave buggy in some cases.
What's Changed
- fix(core): resolve infinite loop with loadable of derived async atom in some cases by @riemonyamada in #1118
New Contributors
Full Changelog: v1.6.4...v1.6.5
v1.6.4
This release contains several small improvements in non-core functions. Some of changes introduce deprecation of simple form, which will be warned.
What's Changed
- feat(devtools): enabled option in useAtomDevtools by @Aslemammad in #1095
- feat(devtools): enabled option useAtomsDevtools by @Aslemammad in #1076
- feat(utils): splitAtom actions for remove/insert/move by @dai-shi in #1097
- fix(core,utils): improve awaited types and waitForAll type by @dai-shi in #1098
- fix(utils): make useAtomCallback return sync if possible by @dai-shi in #1101
Full Changelog: v1.6.3...v1.6.4
v1.6.3
There was a regression in atomWithStorage
in v1.6.2, and it's fixed.
What's Changed
- fix(utils): undefined bug with no entry in storage by @dai-shi in #1088
- fix(core): handle returning infinite promise in derived atoms by @dai-shi in #1089
Full Changelog: v1.6.2...v1.6.3