Skip to content

Commit 74a4059

Browse files
committed
fix typo
1 parent 1732533 commit 74a4059

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

website/versioned_docs/version-0.81/intro-react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ Now, when someone presses the button, `onPress` will fire, calling the `setIsHun
445445
/>
446446
```
447447

448-
::info
448+
:::info
449449
You might’ve noticed that although `isHungry` is a [const](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/const), it is seemingly reassignable! The `const` keyword here does not mean that the state itself is immutable. Rather, it means that the reference to the object, that contains the state and the function to update it, will not change.
450450
What is happening is when a state-setting function like `setIsHungry` is called, its component will re-render. In this case the `Cat` function will run again—and this time, `useState` will give us the next value of `isHungry`.
451451
:::

0 commit comments

Comments
 (0)