4 ms·
A view is made up of many components.
by zackify 11y ago
A view is made up of many components.
- spicyj 11y agoMost of your components should be made up of smaller components. I'm not sure why this distinction is useful?
- zackify 11y agoI'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.
- bebraw 11y agoI 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/ http://patternlab.io/) is close to this idea.
- eswat 11y agoWhile 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.)