I create a react library using https://www.npmjs.com/package/create-react-library And successfully used it on other React project. But when I tried to use react hooks functiona
I just ran into the same issue. I was able to fix it by pointing to the same react in my example app as in my library:
App Structure
Root
So, from the example > package.json I changed react to be:
"react": "link:../node_modules/react",
This is much like the npm link
listed above but it won't go away every time you npm install.