-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Stateless Pure Components #9
Comments
Hi @muhilham unfortunately you cannot use stateless pure components due to the fact that StepZilla clones the step components to append a ref so we can provide the jumpToStep() utility method. ref only works when you inherit from React Component (this is why pure components are not supported at the moment). In future we can enable a config param to disable this behaviour. i.e. disableJumpToStep = true/false I'll put this as a enhancement and work on it when I have time. Or feel free to fork and send a pull request if you want to give it a go. |
@newbreedofgeek |
@wassimz it should be possible or I can have a look. Can you give me an example code on your StepZilla initialisation (with your wrapper), so I can reproduce the issue and fix. |
@muhilham I've added support for Pure Components in react-stepzilla v4.2.0. Check out this file for how - https://github.com/newbreedofgeek/react-stepzilla/blob/master/src/examples/Step2.js |
I got this error while implement it on stateless component
Warning: Stateless function components cannot be given refs (See ref "activeComponent" in ProductForm created by StepZilla). Attempts to access this ref will fail.
The text was updated successfully, but these errors were encountered: