Giter VIP home page Giter VIP logo

Comments (6)

dvdzkwsk avatar dvdzkwsk commented on April 26, 2024

I'd like to hear more on this before just changing all the files in the project. Personally, the .jsx extension has been helpful since my IDE can make assumptions based off the of the file extension, and even simple things like file icon extensions help separate what in a project is a react component and what's just vanilla JS, for lack of a better term.

from react-redux-starter-kit.

nodkz avatar nodkz commented on April 26, 2024

I think for newbie is better use .jsx. After some time they transparently may migrate to the .js names, when their religion changes.

Jsx is not vanilla js, so lets get to newbies chance to clarify (googlify) what is jsx, what is es6 and etc.

from react-redux-starter-kit.

nhagen avatar nhagen commented on April 26, 2024

+1 for .js. I don't think its that important, but I get the sense that the community is more and more not making the distinction. JSX isn't vanilla js, but neither is ES6/ES7, and we're not using .es6. The pattern seems to be that if its getting transpiled down to vanilla js the .js extension is okay.

I also think people who are able to grasp all of the things in this library are people who are generally familiar with React by now (aka, they've changed their religion, as nodkz says).

The biggest kicker might be IDE compatibility though. I have zero issues with JSX in .js in vim, but I'm interested to get a better idea of what other IDE's are capable of.

from react-redux-starter-kit.

dvdzkwsk avatar dvdzkwsk commented on April 26, 2024

@nhagen I really like the argument about .es6 as I've never been a fan of that extension. Personally the only thing holding me back right now is the nice file icons I get in my IDE, but thinking about it that's a pretty silly reason to make decision for a starter kit.

So, that said, .js it is. I'll update the project later. I do have one more question, however: what about naming conventions? A lot of React projects seem to be going with ProperCased file names for components, which is a divergence from the previously popular dash-separated names. My team has actually switched to the former, since the file name then matches the class name, but I'd be curious to hear what others think.

from react-redux-starter-kit.

nhagen avatar nhagen commented on April 26, 2024

Hm. I've always used thisCamelCase, but it looks like facebook uses ProperCase, so thats probably what everyone should be doing for JSX.. Crap.

from react-redux-starter-kit.

dvdzkwsk avatar dvdzkwsk commented on April 26, 2024

Updated all .jsx files with #62.

from react-redux-starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.