mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
Update use-shallow.md (#3004)
This commit is contained in:
parent
57608bbbdf
commit
67371154ed
@ -90,7 +90,7 @@ function UpdateBabyBearMeal() {
|
||||
useEffect(() => {
|
||||
const timer = setInterval(() => {
|
||||
useBearFamilyMealsStore.setState({
|
||||
tinyBear: meals[Math.floor(Math.random() * (meals.length - 1))],
|
||||
babyBear: meals[Math.floor(Math.random() * (meals.length - 1))],
|
||||
})
|
||||
}, 1000)
|
||||
|
||||
@ -109,7 +109,7 @@ Finally, we combine both components in the `App` component to see them in action
|
||||
export default function App() {
|
||||
return (
|
||||
<>
|
||||
<UpdateTinyBearPorridge />
|
||||
<UpdateBabyBearPorridge />
|
||||
<BearNames />
|
||||
</>
|
||||
)
|
||||
@ -149,7 +149,7 @@ function UpdateBabyBearMeal() {
|
||||
useEffect(() => {
|
||||
const timer = setInterval(() => {
|
||||
useBearFamilyMealsStore.setState({
|
||||
tinyBear: meals[Math.floor(Math.random() * (meals.length - 1))],
|
||||
babyBear: meals[Math.floor(Math.random() * (meals.length - 1))],
|
||||
})
|
||||
}, 1000)
|
||||
|
||||
@ -226,7 +226,7 @@ function UpdateBabyBearMeal() {
|
||||
useEffect(() => {
|
||||
const timer = setInterval(() => {
|
||||
useBearFamilyMealsStore.setState({
|
||||
tinyBear: meals[Math.floor(Math.random() * (meals.length - 1))],
|
||||
babyBear: meals[Math.floor(Math.random() * (meals.length - 1))],
|
||||
})
|
||||
}, 1000)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user