Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loss of .jsx extension #49

Closed
cedricss opened this issue Feb 4, 2015 · 4 comments
Closed

Loss of .jsx extension #49

cedricss opened this issue Feb 4, 2015 · 4 comments
Labels

Comments

@cedricss
Copy link

cedricss commented Feb 4, 2015

Looks like #38 merged pull request has moved reactSuffix from .jsx to .js, breaking some user build rules or code editor conf based on the extension.

Example: scripts/component/main.js is still a JSX file but with the .js extension.

Any particular reason for this change? /cc @andrewliebchen

@newtriks newtriks added question and removed question labels Feb 4, 2015
@newtriks
Copy link
Member

newtriks commented Feb 4, 2015

I welcome thoughts, maybe this should be configurable and therefore an option when running Yeoman....?

Related discussions:

facebook/react#832
kriasoft/react-starter-kit#52 (comment)

@newtriks newtriks changed the title Lost of .jsx extension Loss of .jsx extension Feb 4, 2015
@andrewliebchen
Copy link
Contributor

Making it an option is a nice idea! I'm on the side of .js (obviously), but seems like until one way becomes "standard" both should be supported...

@cedricss
Copy link
Author

cedricss commented Feb 5, 2015

Oh indeed, it looks clear that Facebook is pushing forward the .js extension (see latest reactjs conf videos, or their code example).

And some code editor plugins are experimenting other ways to detect JSX file.

In the end, I'm in favor of keeping .js as the default and only option:

  • to continue this convention adoption effort
  • to avoid confusing new react user with an extra subtle option

@newtriks
Copy link
Member

newtriks commented Feb 5, 2015

to avoid confusing new react user with an extra subtle option
@cedricss agreed. So, I will close this and stick with how it is for now but reopen if the consensus changes.

@newtriks newtriks closed this as completed Feb 5, 2015
srackham added a commit to srackham/flux-backbone-todo that referenced this issue Mar 19, 2015
peterjmag added a commit to peterjmag/reading-list that referenced this issue Mar 31, 2015
This brings the app in line a bit more with FB's coding style for
React Native apps.

See also:
react-webpack-generators/generator-react-webpack#49 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants