4 ms·
For some reason React prefers to return arrays. I never understood the reason. const [state, setState] = useState(initialState) instead of const {state,
by vbezhenar 2y ago
For some reason React prefers to return arrays. I never understood the reason.
const [state, setState] = useState(initialState)
instead of
const {state, setState} = useState(initialState)