Reactgo: Renaming jsx to js

Created on 30 Aug 2016  Â·  4Comments  Â·  Source: reactGo/reactGo

Enhancement

  • Rename all jsx files into js

Reason to enhance/problem with existing solution

  • It's really bugging me that we use jsx. This is the remnant of the past when we wanted to differentiate between a jsx and js file. Given that this boilerplate is a react app, I don't see value in naming it jsx now.
  • Keep kode klean.

Most helpful comment

eslint-plugin-react recommends jsx file extension though...
Link

All 4 comments

eslint-plugin-react recommends jsx file extension though...
Link

I think I side with @ZeroCho, if a file contains jsx inside it then I think there is some benefit in the file keeping that extension, being explicit about things helps understanding. I don't think there is any real benefit to streamlining the file extensions.

Agreed, .jsx is a very good visual queue for differentiating between components and other script assets inside the same directory (especially at quick glance in a tree-view). Solid attempt to save a few K tho! ; )

Hahaha alright peeps. I've tried to save us from those few keystrokes.

One last attempt: when we are moving towards the component shuffle (I.e. we
have an index file that exposes the components within the folder), just
hurts my soul when I see jsx and js.

Also we can disable that warning for eslint plugin react.

But this is purely a matter of preference - there are pros and cons either
way. Happy to keep as is. 😉

On Thu, 1 Sep 2016 04:39 John Rodler [email protected] wrote:

Agreed, .jsx is a very good visual queue for differentiating between
components and other script assets inside the same directory (especially at
quick glance in a tree-view). Solid attempt to save a few K tho! ; )

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/reactGo/reactGo/issues/478#issuecomment-243803090,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADnMbbtQylqsmUoxnao48sOQssTox2bRks5qlZ6bgaJpZM4JwTf8
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZeroCho picture ZeroCho  Â·  8Comments

jrodl3r picture jrodl3r  Â·  7Comments

slavab89 picture slavab89  Â·  6Comments

jrodl3r picture jrodl3r  Â·  9Comments

psimyn picture psimyn  Â·  6Comments