Extract React components to npm packages #5048
Unanswered
tobedamobe
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Yeaaaaa @tobedamobe I know exactly what you are dealing with. This is very likely related to having multiple instances of React installed when running locally. The fix is to "link" your |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone!
I've been developing with payload for about a year now and over time I've created a few components that I'd like to use in various projects. But of course then via a central npm package. So install, use the component, done.
I have already built a package and bundled it via rollup. As long as I publish and install the package via npm everything works fine. But for debugging and further expansion and testing this is of course annoying. So I would have to republish blindly every time, update the dependency in payload and then notice whether it works or not. Dumb :/
But I just can't get the "invalid hook call" error under control via yarn link. Do you have experience with it? Can someone help me? I would also be happy to post my current code or anything you need to get an overview. I'm just not at home right now ;)
Beta Was this translation helpful? Give feedback.
All reactions