Closed onemanstartup closed 5 years ago
The reason to do it with create-react-class
is so it works with future versions of React and remains ES5 compatible.
As such it's needed as a dependency. 😄
@plougsgaard but if you are using babel then it will be ES5 compatible, and future versions of React will use only classes, this is why this functionality was extracted in another package. And if people won't use create-react-class then this package will add big unneded dependency in their project. At least you can set this as PeerDependencies and people wont' download multiple different versions of create-react-class packages.
I see your argument for putting it as a peer dependency. (#21)
I think it's important to have it be as compatible as possible, which is why Babel shouldn't be a requirement.
@plougsgaard I don't maintain any open source packages, but as far as I know, many people making releases and distribute already compiled code, so people don't need babel for compiling.
+1 to @onemanstartup , the package can publish with a precompiled dist
file and an optional src
file, src can be written in ES6 while the dist is compiled to ES5 and main
in package.json
is the dist
Or why not remove it at all?