I created a javascript library using webpack
I added the file into my react application:
import {Helmet} from "react-helmet";
ReactDOM.render(
when I was checking the site sources - I found out that lib.js exists in there. I have a component that needs to create an object that exists inside the lib.js file
#myComponent.js
class MyComponent extents Component {
constructor(){
this.obj = new MyObject() // here is the problem
}
}
render() {
return <div className="main-background">
some stuff
</div>;
}
}
I suspect that the problem has something to do with DomReady - the library probably doesn't get loaded and the module is not defined
