Usually I import a lib to a JavaScript project this way
<script src="../lib/someLib.js"></script>
var theLib = new someLibConstructor("test");
I am very new with react and I am not sure how to achieve this. I importe the lib
import someLib from '../lib/someLib.js';
but how can I call the constructor now?
EDIT:
This is how the library looks like
class someLibConstructor {
constructor(t) {
}
export default someLibConstructor
Now I am doing this:
import someLibConstructor from '../lib/someLib.js';
var s = new someLibConstructor("test");
I get an error Type error :
... is not a constructor"