-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call hook outside react context #44
Comments
Interesting, this never occurred to me before. |
I tryed with the onLoader FInished callback prop but I got the same problem. |
we are using "react": "^16.8.2" |
@fijemax Is this still an issue? Can you please provide a self contained reproducible example? |
Hello,
I used react-top-loading-bar in a simple way in a component library:
So when I link the library to my application, I have a hook problem:
I inspected hook in react-top-loading-bar code and didn't find anything ... but in the file index.modern.js from npmjs package I found this:
and it seems corrrspond to this code:
To summaries:
Object(__WEBPACK_IMPORTED_MODULE_0_react__["useRef"])
=>checkIfFull
I deleted the
index.modern.js" frile from the node_module package
react-top-loading-barand webpack used
index.jsfile instead, and seems work perfectly. But I don't know how to configure webpack to use
index.jsinstead of
index.modern.jsand I don't know if
index.modern.js``` is generated correctly.The text was updated successfully, but these errors were encountered: