Open faire2 opened 4 years ago
This looks like a misconfiguration, are you using babel to transpile?
The Unexpected token
is triggered because your bundler / transpiler does not recognize JSX (thus does not transpile it to React.createElement
.
Could you share your bundler (webpack, rollup, ...) and transpiler (babel) config?
I am using create-react-app - would it help if I posted the contents of package.json / package-lock.json?
But it is a fresh installation, I have only added axis and react-spinners. I will try to create a fresh procet to see if the problem reproduces.
@faire2 Did your problem still occur with a fresh project?
I have installed the library and tried to create a simple component and then copy the example 1:1, but in both cases I endad up with this error:
When I deleted the test component I noticed that the error persists, so it seems that something iswrong with the installation.
I have not yet imported css (I am still trying to understand how should I do that) but the problem seems unrelated to that.
I am using it in a small-scale react project:
I have no experience with refs other than reading React docs on them so I am really clueless at this point.