const item = ‘a’;
const [, setA] = React.useState(a);
^ can I do this to modify the value of a?
I ask because item was passed in from another component and it will be updated from there too
it works but idk if it’s good practice, any advices?
const item = ‘a’;
const [, setA] = React.useState(a);
^ can I do this to modify the value of a?
I ask because item was passed in from another component and it will be updated from there too
it works but idk if it’s good practice, any advices?