diff --git a/examples/history-sync-json/src/components/Counter/index.tsx b/examples/history-sync-json/src/components/Counter/index.tsx index 65f62e7c..39673f21 100644 --- a/examples/history-sync-json/src/components/Counter/index.tsx +++ b/examples/history-sync-json/src/components/Counter/index.tsx @@ -1,11 +1,11 @@ import { number } from '@recoiljs/refine' import { useRecoilState } from 'recoil' import { syncEffect } from 'recoil-sync' -import { atomFamilyWithInitialValue } from 'recoil-sync-next' +import { initializableAtomFamily } from 'recoil-sync-next' import styles from './index.module.css' -export const counter = atomFamilyWithInitialValue({ +export const counter = initializableAtomFamily({ key: 'counterState', effects: [syncEffect({ refine: number() })], }) diff --git a/examples/history-sync-json/src/components/Textfield/index.tsx b/examples/history-sync-json/src/components/Textfield/index.tsx index 85ff1eb2..3b15e559 100644 --- a/examples/history-sync-json/src/components/Textfield/index.tsx +++ b/examples/history-sync-json/src/components/Textfield/index.tsx @@ -1,11 +1,11 @@ import { string } from '@recoiljs/refine' import { useRecoilState } from 'recoil' import { syncEffect } from 'recoil-sync' -import { atomWithInitialValue } from 'recoil-sync-next' +import { initializableAtom } from 'recoil-sync-next' import styles from './index.module.css' -export const textState = atomWithInitialValue({ +export const textState = initializableAtom({ key: 'textState', effects: [syncEffect({ refine: string() })], }) diff --git a/examples/url-sync-json/src/components/Counter/index.tsx b/examples/url-sync-json/src/components/Counter/index.tsx index 12493c32..9de2fbea 100644 --- a/examples/url-sync-json/src/components/Counter/index.tsx +++ b/examples/url-sync-json/src/components/Counter/index.tsx @@ -1,11 +1,11 @@ import { number } from '@recoiljs/refine' import { useRecoilState } from 'recoil' import { syncEffect } from 'recoil-sync' -import { atomFamilyWithInitialValue } from 'recoil-sync-next' +import { initializableAtomFamily } from 'recoil-sync-next' import styles from './index.module.css' -export const counter = atomFamilyWithInitialValue({ +export const counter = initializableAtomFamily({ key: 'counterState', effects: [syncEffect({ storeKey: 'url-json-store', refine: number() })], }) diff --git a/package.json b/package.json index d63138bd..1a93dc4c 100644 --- a/package.json +++ b/package.json @@ -37,10 +37,13 @@ "lint-fix:ex": "run-s -c lint-fix:ex:*", "lint-fix:ex:eslint": "CMD=lint-fix:eslint run-s -c run-ex:*", "lint-fix:ex:prettier": "CMD=lint-fix:prettier run-s -c run-ex:*", + "local-copy": "CMD=local-copy run-s -c run-ex:*", "test": "jest", "prepare": "simple-git-hooks", "run-ex:history-sync-json": "yarn --cwd examples/history-sync-json run $CMD", - "run-ex:url-sync-json": "yarn --cwd examples/url-sync-json run $CMD" + "run-ex:history-sync-transit": "yarn --cwd examples/history-sync-transit run $CMD", + "run-ex:url-sync-json": "yarn --cwd examples/url-sync-json run $CMD", + "run-ex:url-sync-transit": "yarn --cwd examples/url-sync-transit run $CMD" }, "simple-git-hooks": { "pre-commit": "yarn run lint:lib:eslint && yarn run lint:ex:eslint && yarn run test"