You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing an app and trying to import this library to use it. I've installed it using Yarn and I'm using Webpack to bundle it up along with my other dependencies.
I have a simple React component JSX file like this:
When I try to render this, I get an error "React is not defined" coming from "react-bootstrap-twitter.js". The reason is that it expects "React" to be a globally defined variable.
For reference, this is the start of "react-bootstrap-twitter":
I'm pretty new to web stuff and I have no idea how to make React globally available within my app, but wouldn't it make more sense to declare React as a peer dependency and import/require it at the top of the file?
Is there a way I can adapt my code to let me use TreeView?
The text was updated successfully, but these errors were encountered:
I'm developing an app and trying to import this library to use it. I've installed it using Yarn and I'm using Webpack to bundle it up along with my other dependencies.
I have a simple React component JSX file like this:
When I try to render this, I get an error "React is not defined" coming from "react-bootstrap-twitter.js". The reason is that it expects "React" to be a globally defined variable.
For reference, this is the start of "react-bootstrap-twitter":
I'm pretty new to web stuff and I have no idea how to make React globally available within my app, but wouldn't it make more sense to declare React as a peer dependency and import/require it at the top of the file?
Is there a way I can adapt my code to let me use TreeView?
The text was updated successfully, but these errors were encountered: