Should Ember Components Load Data?

The ember team does give us some guidance from Ember Data’s Transition.md document, it states:

In general, looking up models directly in a component is an anti-pattern, and you should prefer to pass in any model you need in the template that included the component.

That being said, I think it would really depend upon your use case (they do show you how to inject the store into Components anyway). I can imagine some scenarios where the component retrieving data might make the most sense…

What are you trying to do exactly? That might be the best way to explore wether it may or may not be a good option.

1 Like