Skip to content

Commit

Permalink
Merge branch 'main' into feature/extract-state
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Jan 7, 2025
2 parents c3f552a + 929b547 commit e9fd37c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Fixes #

## Check List

- [ ] `pnpm run prettier` for formatting code and docs
- [ ] `pnpm run fix:format` for formatting code and docs
2 changes: 1 addition & 1 deletion docs/apis/create-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ import { createStore } from 'zustand/vanilla'

type PositionStore = [number, number]

const positionStore = create<PositionStore>()(() => [0, 0])
const positionStore = createStore<PositionStore>()(() => [0, 0])

const $dotContainer = document.getElementById('dot-container') as HTMLDivElement
const $dot = document.getElementById('dot') as HTMLDivElement
Expand Down
4 changes: 2 additions & 2 deletions docs/apis/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ const usePersonStore = create<PersonStore>()((set) => ({
}))

export default function Form() {
const person = usePersonStore((state) => person)
const setPerson = usePersonStore((state) => setPerson)
const person = usePersonStore((state) => state)
const setPerson = usePersonStore((state) => state.setPerson)

function handleFirstNameChange(e: ChangeEvent<HTMLInputElement>) {
person.firstName = e.target.value
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"build:react:shallow": "rollup -c --config-react_shallow",
"build:traditional": "rollup -c --config-traditional",
"postbuild": "pnpm patch-d-ts && pnpm copy && pnpm patch-old-ts && pnpm patch-esm-ts",
"prettier": "prettier \"*.{js,json,md}\" \"{examples,src,tests,docs}/**/*.{js,jsx,ts,tsx,md,mdx}\" --write",
"eslint": "eslint . --fix",
"fix:format": "prettier \"*.{js,json,md}\" \"{examples,src,tests,docs}/**/*.{js,jsx,ts,tsx,md,mdx}\" --write",
"fix:lint": "eslint . --fix",
"test": "pnpm run '/^test:.*/'",
"test:format": "prettier '*.{js,json,md}' '{examples,src,tests,docs}/**/*.{js,jsx,ts,tsx,md,mdx}' --list-different",
"test:types": "tsc --noEmit",
Expand Down

0 comments on commit e9fd37c

Please sign in to comment.