What is useState?
In one line: useState is how a function component remembers a value between renders. Without it, every render would reset let n = 0. With it, n survives and the UI can change.
It is a hook — a function whose name starts with use. React only lets you call hooks in components (or other hooks). That is why the question is worded ‘what is the useState in React’ — they want hook + memory + re-render, not a blog slogan.
What is useState? — on screen — Hello Asha. useState holds name inside the function component.
useState(false)
│ click
▼
setLiked(true)
│
▼
Like → LikedExam tip
Memory between renders + setter.