DEV Community

Discussion on: React so far

Collapse
 
deciduously profile image
Ben Lovy

A component could be responsible for making AJAX requests, and dispensing the response to a number of child components that do render, for example. There is nothing to view for the parent, it's just making requests to the server, but each child will depend on the data it provides. That way you can separate your concerns - the components responsible for displaying the data don't need to know about AJAX at all, they just get the data they need as props.