
useState is a React Hook that lets you track data or properties in your component.
const [state, setState] = useState(initialState)
You can initialize the state while declaring it and then setState in response to any event like
function handleClick() { setState(newState); }
About the author
Full Stack Developer with a passion for building web applications. PHP, Node.js, Laravel, MySQL, MongoDB. Love collaborating & making a difference
Comments
Join the discussionNo comments yet. Be the first to comment.




