State Variables in React

Which of these state variable assignments using the state hooks are valid?

A:

 const [item, setItem] = useState(4);

B:

 const [foo, setFoo] = useState('text');

C:

 const [stuff, setStuff] = useState([{ text: 'things' }]);
Options
  1. A
  2. A,B
  3. B,C
  4. A,B,C

Related Posts

Close Bitnami banner
Bitnami