Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Jotai v2 API #1

Merged
merged 2 commits into from Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/atomWithStore.test.tsx
@@ -1,6 +1,6 @@
import React, { StrictMode } from 'react'
import { act, fireEvent, render } from '@testing-library/react'
import { useAtom } from 'jotai'
import { useAtom } from 'jotai/react'
import { legacy_createStore as createStore } from 'redux'
import { atomWithStore } from '../src/index'

Expand Down
2 changes: 1 addition & 1 deletion examples/01_typescript/src/App.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { useAtom } from 'jotai'
import { atomWithStore } from 'jotai-redux'
import { useAtom } from 'jotai/react'
import { legacy_createStore as createStore } from 'redux'

const initialState = { count: 0 }
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -64,7 +64,7 @@
"html-webpack-plugin": "^5.5.0",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jotai": "^1.9.2",
"jotai": "^1.11.0",
"microbundle": "^0.15.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
Expand All @@ -80,6 +80,6 @@
"webpack-dev-server": "^4.11.1"
},
"peerDependencies": {
"jotai": "*"
"jotai": ">=1.11.0"
}
}
2 changes: 1 addition & 1 deletion src/atomWithStore.ts
@@ -1,4 +1,4 @@
import { atom } from 'jotai'
import { atom } from 'jotai/vanilla'
import type { Action, AnyAction, Store } from 'redux'

export function atomWithStore<State, A extends Action = AnyAction>(
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -4924,10 +4924,10 @@ jest@^29.3.1:
import-local "^3.0.2"
jest-cli "^29.3.1"

jotai@^1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/jotai/-/jotai-1.9.2.tgz#708990083e98b03ba41131a67acdbb681c278510"
integrity sha512-/893WrniZwoVc0+3JR056r0FTC/tGbgyHco9dfgde6K8TU6XNxrOSw4jCRdDicncw67A37v2GNGzXSpHKbHPmw==
jotai@^1.11.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/jotai/-/jotai-1.11.0.tgz#d2a666f16935797743eb41a3b75583ea4e17fefb"
integrity sha512-8OzJmRxcTZoAOJSz6uTnmofmjAOgNOdAOy26rvyw3OBxt6XIoklNnfUTCm8wgp84SSLJbPZA01VS5O/SUz+QYg==

js-sdsl@^4.1.4:
version "4.1.5"
Expand Down