SnipZard
Search snippets
Home
Portfolio
Contact
useState
The useState hook allows you to add state to your functional components.
Snippet:
const
[
state
,
setState
]
=
useState
(
initialValue
)
;
Copy Code
Example:
const
[
count
,
setCount
]
=
useState
(
0
)
;
Copy Code