In functional components within ReactJS, the following line allows the creation of:
- A variable to record the current count
- A method to save the state when called
Example in JS:
let [count, setCount] = useState([]);
How does this work from a declaration point of view and what is this kind of declaration called?
I understand basic declarations like let array = [];
etc but am not familiar with the other way around.