I am new in react. I want to use form stepper in my project. I found one library but in that library using class components. I am little confuse convert class components to
Replace your constructor and functions with this code, basically you don't need a constructor and 'this'.
const [page, setPage] = React.useState(0);
const [steps, setSteps] = React.useState([
{title: 'Visitor Details'},
{title: 'Personal Details'},
{title: 'Nominee Details'}
])
function nextPage() {
setPage(page + 1)
}
function previousPage() {
setPage(page - 1)
}