mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
fix(doc): update tutorial guide and fix doc build (#2835)
* fix(doc): update tutorial guide * fix(doc): update tutorial guide
This commit is contained in:
parent
bf4bcf20c5
commit
795528efb5
@ -446,7 +446,7 @@ const useGameStore = create(
|
||||
typeof nextSquares === 'function'
|
||||
? nextSquares(state.squares)
|
||||
: nextSquares,
|
||||
}));
|
||||
}))
|
||||
},
|
||||
setXIsNext: (nextXIsNext) => {
|
||||
set((state) => ({
|
||||
@ -454,11 +454,11 @@ const useGameStore = create(
|
||||
typeof nextXIsNext === 'function'
|
||||
? nextXIsNext(state.xIsNext)
|
||||
: nextXIsNext,
|
||||
}));
|
||||
}))
|
||||
},
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
}),
|
||||
)
|
||||
```
|
||||
|
||||
Each time a player moves, `xIsNext` (a boolean) will be flipped to determine which player goes next
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user