React

ReactJS Practical Questions - React hooks useState...

14.

What is the correct way to declare and initialize a state variable using the useState hook?

const [count, setCount] = useState(0);

const [state, setState] = useState({name: "John", age: 25});

const [name, setName] = useState();

const count = useState(0);