Skip to content

Conversation

dylancom
Copy link

@dylancom dylancom commented Jun 4, 2016

For stateless components (also called presentational/dumb components), Facebook introduced a much simpler syntax than ES6 classes.
Stateless functional components simply take props as an argument and return the element you want to render.

@timdorr
Copy link
Member

timdorr commented Jun 4, 2016

Hmm, I don't think there's any reason not to use these. @ryanflorence @taion Do you guys remember any reason for not going with functional components? Or was it just a timing thing prior to React 0.14?

👍 from me if there isn't any reason for the ES6 format.

@taion
Copy link
Contributor

taion commented Jun 4, 2016

This is just in the examples? Cool! Not sure why we used ES6 components there given that our style guide explicitly calls for React.createClass elsewhere in code.

One nit – could we be consistent between using props as an argument v spreading out the individual props in the function definition?

@dylancom
Copy link
Author

dylancom commented Jun 4, 2016

Consistency added. I only noticed it in the examples as I needed the transition example today.

@timdorr
Copy link
Member

timdorr commented Jun 4, 2016

Thanks!

@timdorr timdorr merged commit ca4f5a7 into remix-run:master Jun 4, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants