Component have ref, storybook will have error
See original GitHub issuemy component render function has return many input with ref, when I run npm run storybook
, the error will throw
Uncaught Invariant Violation: removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).
what should I do?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
React ref as string throw an error · Issue #3424
So ref as string is working in storybook, but it is not 2 different versions of React who create the problem. It is...
Read more >addComponentAsRefTo error when using component from ...
I do a nmp link in the storybook in order to use it in my project. I can see the component, but it...
Read more >Frequently Asked Questions - Storybook - JS.ORG
Here are some answers to frequently asked questions. If you have a question, you can ask it by opening an issue on the...
Read more >Invalid Hook Call Warning
You are probably here because you got the following error message: Hooks can only be called inside the body of a function component....
Read more >Next-level component showcasing with Storybook controls
As you can see, the Headline component just has a color prop of type string as input. To get the color picker control...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is usually means two versions of React running here. Could you send us a sample repo?
Nx Cloud Report
CI ran the following commands for commit c1a5e8981625f34c27045e07bb72112c7fdbd661. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this branch
nx run-many --target=prepare --all --parallel --max-parallel=15
Sent with 💌 from NxCloud.