React 16.9
I am aware that this class component state
:
class JustAnotherCounter extends Component {
state = {
count: 0
};
is the equivalent of using Hooks useState
:
function JustAnotherCounter() {
const [count, setCount] = useState(0);
..but what would be the equivalent of the class component state below using Hooks useState
?:
class Main extends Component {
state = {
step: 1,
firstName: '',
lastName: '',
jobTitle: '',
jobCompany: '',
jobLocation: '',
}
Any help would be much appreciated.