News for hackers. Stuff that matters.
Re:How to Structure React Projects by phaedryx on Sunday November 29, 2015 @01:08PM (#10645439)
How is a "component" different from a "view"?
Re:How to Structure React Projects by subir on Sunday November 29, 2015 @01:14PM (#10645466)
Per my understanding, a component is meant to be a re-usable unit which can be included in one or more views. A View can be thought as a single 'page' of the application, (eg: Login, Home, etc) which may be composed of several components.
Re:How to Structure React Projects by pwmckenna on Sunday November 29, 2015 @01:12PM (#10645452)
One common interpretation:

Components are "dumb", and just consume props. Views are top level Components, usually rendered by the router, that tie into your fluxy goodness.

Re:How to Structure React Projects by jayvanguard on Sunday November 29, 2015 @01:48PM (#10645554)
A component is is meant to be re-used in different contexts, a view not necessarily.
Re:How to Structure React Projects by zackify on Sunday November 29, 2015 @01:10PM (#10645447)
A view is made up of many components.
Re:How to Structure React Projects by eswat on Sunday November 29, 2015 @01:50PM (#10645562)
While the “views are many components” reply is true that’s not really the distinction. Views are React components that have state or other complexity to them. Components are React components that just consume props and return DOM that may reference those props but nothing else in your app (they won't look at state, globals, etc.)
Re:How to Structure React Projects by spicyj on Sunday November 29, 2015 @01:13PM (#10645461)
Most of your components should be made up of smaller components. I'm not sure why this distinction is useful?
Re:How to Structure React Projects by bebraw on Sunday November 29, 2015 @01:22PM (#10645487)
I see view (or screen) as something that maps to a route. It's true it's definitely a component.

I feel adding vocabulary like this to a system can help with understandability. That's the point I made with a "feature". It's something that could fit between views and components.

Atomic design (http://patternlab.io/) is close to this idea.

Re:How to Structure React Projects by zackify on Sunday November 29, 2015 @01:16PM (#10645472)
I've never done it this way, I keep calling my container components, components. In my projects I do not make a distinction and call them views. I was just stating the author's point.