Routable components and Ember-Data

In 2014, injecting the Store into components was not a best practice. Now we know that routable components will replace the controllers. Will routable components have access to the Store?

More specifically, my question is: It is clear to me that some components will be application-specific and will not be reusable. For this type of components, would it be a good practice to give them access to the store? Maybe this goes against “data-down, actions-up”?

This is useful: rfcs/0000-routeable-components.md at routeable-components · ef4/rfcs · GitHub

This is good reading, but a bit old: Should Ember Components Load Data?

4 Likes

Yes.

I maintain that you should not be injecting service:store into components but manage your data top-level (routable component/route) but I’m clearly in the minority, so this pattern will be very prevalent going forward.

Thanks for the clarification. I will try to not inject the store in the components (for the moment).