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
Add to your Components Library's package.json
package.json
"peerDependencies": { "react": "" }
so that your lib package will use the same react package as your main app. https://nodejs.org/es/blog/npm/peer-dependencies/
react