Skip to content

Commit 0dcf91b

Browse files
authored
refactor: support INTERNAL_buildStoreRev2 + drop support for older version (#201)
* refactor: support INTERNAL_buildStoreRev2 + drop support for older version * chore: update jotai version
1 parent 3ca38db commit 0dcf91b

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
## ☝️ Prerequisites
3030

31-
- Jotai version `>=v2.12.3`
31+
- Jotai version `>=v2.14.0`
3232
- React version `>=17.0.0`
3333

3434
## 📦 Setup

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"jest": "^29.7.0",
142142
"jest-environment-jsdom": "^29.7.0",
143143
"jest-watch-typeahead": "^2.2.2",
144-
"jotai": "^2.12.5",
144+
"jotai": "^2.14.0",
145145
"jotai-tanstack-query": "^0.9.0",
146146
"lint-staged": "^15.5.1",
147147
"postcss": "^8.5.3",
@@ -164,8 +164,8 @@
164164
"webpack": "^5.99.6"
165165
},
166166
"peerDependencies": {
167-
"react": ">=17.0.0",
168-
"jotai": ">=2.12.3"
167+
"jotai": ">=2.12.3",
168+
"react": ">=17.0.0"
169169
},
170170
"dependencies": {
171171
"@mantine/code-highlight": "^7.17.4",

pnpm-lock.yaml

Lines changed: 14 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/internals/compose-with-devtools.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Atom, WritableAtom } from 'jotai';
22
import { INTERNAL_overrideCreateStore } from 'jotai/vanilla';
33
import {
4-
INTERNAL_buildStoreRev1 as INTERNAL_buildStore,
5-
INTERNAL_initializeStoreHooks,
4+
INTERNAL_buildStoreRev2 as INTERNAL_buildStore,
5+
INTERNAL_initializeStoreHooksRev2 as INTERNAL_initializeStoreHooks,
66
} from 'jotai/vanilla/internals';
77
import {
88
AnyAtom,
@@ -170,7 +170,7 @@ const createDevStore = (): StoreWithDevMethods => {
170170
undefined,
171171
storeHooks,
172172
undefined,
173-
(atom, get, set, ...args) => {
173+
(_store, atom, get, set, ...args) => {
174174
if (inRestoreAtom) {
175175
return set(atom, ...(args as any));
176176
}

0 commit comments

Comments
 (0)