zaguiini / formik-wizard

A multi-step form component powered by formik and react-albus
MIT License
86 stars 26 forks source link

Consider removing setImmediate call #37

Open ivankoleda opened 3 years ago

ivankoleda commented 3 years ago

setImmediate is deprecated and it may work fine with some tools like CRA, but it does not work out of the box with nextjs. So anyone who is using this library with build tools have to polyfill it. Seem like this call may not be wrapped in setImmediate.

     setImmediate(wizard.next)

https://github.com/zaguiini/formik-wizard/blob/master/src/index.tsx#L82 Please, correct me if I'm wrong and there is a reason for using setImmediate. Otherwise it may be removed and this will help people who are not able to use this library out of the box.