Closed gotexis closed 5 years ago
Fuck me, I can't believe the problem was I wrote React.Component instead of React.Fragment
Holyshit
@gotexis hey ✋, if you wish to use React.Fragment at the root of your render, then I suggest to take a look at this plugin babel-plugin-transform-jsx-classname-components. With it you can simply specify that you want to keep React
as an object instead of as a component.
Example of usage in .babelrc:
{
"plugins": [
"transform-react-pug",
+ ["transform-jsx-classname-components", {
+ "objects": ["React"],
+ }],
],
}
@gotexis do you still need any help with that?
hey! Thanks for he reply. I was already using your solution and it worked like a charm. My drama was that I made a typo of React.Component (which clearly resolved into a huge module in where it shouldn’t be)
Haha
Nice
First of all thanks to the authors greate work, productivity has peaked with this valuable tool.
Now I am having a hard time trying to implement this is in a ES6 classed based components. like
Tons of error messages are returning from this code. Is this not supported or am I doing it wrong?
Below errors: