Skip to content
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

Fix for React hooks #3

Closed
wants to merge 1 commit into from
Closed

Conversation

f8k8
Copy link
Contributor

@f8k8 f8k8 commented Jul 14, 2021

This fixes an error when using React hooks in stories. Using hooks would give:

Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app

@santino
Copy link
Owner

santino commented Jul 15, 2021

Hi @f8k8 ,
thank you so much for your contribution!!!

If you could give me maintainer permissions, I would like to push an extra commit on this PR.
You can do so on the pull request by enabling the dedicated flag.
screenshot

Full guide is available here.

@f8k8
Copy link
Contributor Author

f8k8 commented Jul 15, 2021

Hmm, the option doesn't seem to be there for me:
image

You could just pull the change into a new branch and create a new PR then close this one if it's easier?

@santino santino mentioned this pull request Jul 15, 2021
@santino
Copy link
Owner

santino commented Jul 15, 2021

That's a shame.
I wanted to preserve you created the PR :)

Anyway, I raised another PR, your commit is still there at least.

Thanks again!

@santino santino closed this Jul 15, 2021
@santino
Copy link
Owner

santino commented Jul 15, 2021

@f8k8 I have now released v1.1.0
Would you be so kind to install it and confirm it fixes usage with Hooks?

@f8k8
Copy link
Contributor Author

f8k8 commented Jul 21, 2021

Tested here - seems to all work fine. Thanks 👍

@santino
Copy link
Owner

santino commented Jul 21, 2021

Brilliant, thanks for that!
Enjoy your day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants