useState is meant for saving state when using a function to create a component. If you are using a class, the old way still holds. I recommend checking the Hooks proposal documentation out and check out Ryan Florence 90% Cleaner React talk from ReactConf2018
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
useStateis meant for saving state when using a function to create a component. If you are using a class, the old way still holds. I recommend checking the Hooks proposal documentation out and check out Ryan Florence 90% Cleaner React talk from ReactConf2018