Skip to content

Releases: pmndrs/jotai

v1.7.6

20 Jul 11:17
Compare
Choose a tag to compare

We still had some typing issues introduced in v1.7.3, which is basically reverted with some improvements.
This version also has a new implementation of jotai/query which supports error handling.

What's Changed

  • fix(types): use TS interfaces only for public api by @dai-shi in #1289
  • feat(query): support error handling (full re-implementation) by @dai-shi in #1239

Full Changelog: v1.7.5...v1.7.6

v1.7.5

15 Jul 16:10
Compare
Choose a tag to compare

It includes some refactors in core. Please report issues if any regression is found.

What's Changed

Full Changelog: v1.7.4...v1.7.5

v1.7.4

08 Jul 12:08
Compare
Choose a tag to compare

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

Full Changelog: v1.7.3...v1.7.4

v1.7.3

29 Jun 23:50
Compare
Choose a tag to compare

What's Changed

  • fix(core): useAtom should return correct values when changing atoms by @dai-shi in #1236
  • fix(build): Handle ESM imports for @babel/template by @Thisen in #1254

Full Changelog: v1.7.2...v1.7.3

v1.7.2

10 Jun 12:51
Compare
Choose a tag to compare

This includes a small fix to behave better with React 18.

What's Changed

  • fix(core): avoid extra re-renders after commit with derived atoms by @dai-shi in #1214

Full Changelog: v1.7.1...v1.7.2

v1.7.1

02 Jun 13:10
Compare
Choose a tag to compare

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

Full Changelog: v1.7.0...v1.7.1

v1.7.0

28 May 13:49
Compare
Choose a tag to compare

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

19 May 02:44
Compare
Choose a tag to compare

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

Full Changelog: v1.6.6...v1.6.7

v1.6.6

10 May 13:03
Compare
Choose a tag to compare

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

Full Changelog: v1.6.5...v1.6.6

v1.6.5

28 Apr 14:57
Compare
Choose a tag to compare

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

  • @Nsttt made their first contribution in #1104
  • @riemonyamada made their first contribution in #1118

Full Changelog: v1.6.4...v1.6.5