Doesn't work with next 11
johnschult opened this issue · comments
I ran the next
example using this package.json
and you cannot advance to the next step.
{
"name": "nextjs",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^11",
"react": "^17",
"react-dom": "^17",
"react-use-wizard": "^1"
}
}
After clicking Next...
No console messages or errors.
Solved by changing the calls to nextStep
and previousStep
...
<div>
<button
onClick={() => previousStep()}
disabled={isLoading || isFirstStep}
>
Previous
</button>
<button onClick={() => nextStep()} disabled={isLoading || isLastStep}>
Next
</button>
</div>
Good catch, will fix the examples. It's because the event is being passed implicitly.
This was working in previous versions since you couldn't pass an index to previousStep
and nextStep
Closed in #53