Closed eliasericsson closed 5 years ago
It seems that create react app doesn't support ECMAScript Modules
. I published a new version(0.1.3) to npm. Upgrade your reactablejs dependency to 0.1.3. Your App.js
was written by typescript syntax. If you want use reactablejs is Javascript, there is a JS version example
I've now updated to 0.1.3 and it works fine! Thank you very much!
I gather from checking out some other React projects that App.js and App.tsx are interchangable, but the syntax varies a little bit? If there any benefit to using one over the other with reactablejs?
yes, their syntax is different, typescript file just offer some type information. Typescript and Javascript all work fine with reactablejs.
I'm new to React and I can't manage to get reactablejs to work, here is my attempt at implementing the example code: https://github.com/eliasericsson/reactable-example
This is the error I'm getting: ./node_modules/reactablejs/dist/index.mjs Can't import the named export 'Component' from non EcmaScript module (only default export is available)
I apologize if I've missed something fundamental.