diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 01ed803f95..c58c54874f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,6 @@ jobs: registry-url: 'https://registry.npmjs.org' cache: 'pnpm' - run: pnpm install - - run: pnpm test - run: pnpm build - run: npm publish env: diff --git a/README.md b/README.md index 9c39d80691..99b3131119 100644 --- a/README.md +++ b/README.md @@ -381,8 +381,8 @@ import { devtools } from 'zustand/middleware' const usePlainStore1 = create(devtools((set) => ..., { name, store: storeName1 })) const usePlainStore2 = create(devtools((set) => ..., { name, store: storeName2 })) // Usage with a redux store, it will log full action types -const useReduxStore = create(devtools(redux(reducer, initialState)), , { name, store: storeName3 }) -const useReduxStore = create(devtools(redux(reducer, initialState)), , { name, store: storeName4 }) +const useReduxStore = create(devtools(redux(reducer, initialState)), { name, store: storeName3 }) +const useReduxStore = create(devtools(redux(reducer, initialState)), { name, store: storeName4 }) ``` Assigning different connection names will separate stores in redux devtools. This also helps group different stores into separate redux devtools connections. diff --git a/docs/guides/tutorial-tic-tac-toe.md b/docs/guides/tutorial-tic-tac-toe.md index e8a51d9481..2c38ad869f 100644 --- a/docs/guides/tutorial-tic-tac-toe.md +++ b/docs/guides/tutorial-tic-tac-toe.md @@ -123,7 +123,10 @@ function Board({ xIsNext, squares, onPlay }) { } export default function Game() { - const { history, setHistory, currentMove, setCurrentMove } = useGameStore() + const history = useGameStore((state) => state.history) + const setHistory = useGameStore((state) => state.setHistory) + const currentMove = useGameStore((state) => state.currentMove) + const setCurrentMove = useGameStore((state) => state.setCurrentMove) const xIsNext = currentMove % 2 === 0 const currentSquares = history[currentMove] @@ -215,7 +218,7 @@ The `Square` component should take `value` and `onSquareClick` as props. It shou Here's the code for the `Square` component: -```tsx +```jsx function Square({ value, onSquareClick }) { return (