I'm currently reducing / removing npm warnings on a React site.
A large number of these warnings are caused by the setState function as seen below, being 'unused'.
const [state, setState] = useState('some state');
Which of the following would be a better way to remove these warnings? Or is there a better way to approach the issue?
1.
const[state] = useState('some state');
const state = 'some state';