DEV Community


Discussion on: React so far

vjnvisakh profile image
Visakh Vijayan Author

Oh I didn't know that. But how can there be a component without a view?

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.