gatsbyjs / gatsby-starter-documentation

This starter is for Gatsby v0 and is not maintained
67 stars 45 forks source link

Mixed .jsx/.js, ES6 vs createClass #14

Closed tmcw closed 7 years ago

tmcw commented 7 years ago

I'm a little confused by the React & JS usage: some files, like Breakpoint, have .js extensions and use ES6-style components & exports, whereas _template.jsx has a .jsx extension and uses createClass and CommonJS exports. Is this a case of slowly porting things from legacy code, or is there a reason why there are two styles in play?

KyleAMathews commented 7 years ago

Yeah, it's just multiple layers of architecture from different time periods that have never been cleaned up...

tmcw commented 7 years ago

Is now a good time in the project lifecycle to clean this up? Happy to do so, I've got some free time today, but want to make sure it won't be clobbered by a Gatsby n+1 version incoming :)

KyleAMathews commented 7 years ago

A PR would be great! I will be upgrading this repo in the next few weeks to v1 but as the upgrade is mostly moving files around, your changes will survive the journey :-)

On Sun, Jun 25, 2017, 9:40 AM Tom MacWright notifications@github.com wrote:

Is now a good time in the project lifecycle to clean this up? Happy to do so, I've got some free time today, but want to make sure it won't be clobbered by a Gatsby n+1 version incoming :)

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/gatsbyjs/gatsby-starter-documentation/issues/14#issuecomment-310913368, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEVhyiRGrF81dW8M8R_MKjaur63YhNKks5sHo12gaJpZM4NeWlQ .