I created :
- A reusable react component package, and
- A react app for testing the component
Both of them are inside a monorepo (lerna). The problem is the "react" packages for the component & for the app are pointed to "different thing", thus using hook inside the component triggers this error: "Hooks can only be called inside the body of a function component".
Deleting the second "react" package directory will affect to the component project because it's a symbolic linking (similar to shortcut to component project).
Any idea for resolving my problem?