mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
docs(tutorial-tic-tac-toe.md): fix code to prevent infinite loops (#2963)
This commit is contained in:
parent
adf084f85b
commit
37e1e3f193
@ -327,10 +327,8 @@ const useGameStore = create(
|
||||
)
|
||||
|
||||
export default function Board() {
|
||||
const [squares, setSquares] = useGameStore((state) => [
|
||||
state.squares,
|
||||
state.setSquares,
|
||||
])
|
||||
const squares = useGameStore((state) => state.squares)
|
||||
const setSquares = useGameStore((state) => state.setSquares)
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user