-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate defaultStore located at Route.store
#377
Comments
@rwjblue had done some exploration on deprecating this, unsure where it stalled but this prevents |
Just saw the default store mentioned in a video linked in the most recent Ember Weekly: https://youtu.be/EcKaDu0xo_A |
this was covered by #955 |
See (private) docs for this intimate API that often trolls users of
ember-engines
andember-data
.https://emberjs.com/api/ember/3.4/classes/Route/methods/store?anchor=store&show=inherited%2Cprivate
Motivations
ember
ends andember-data
begins, specifically:Route.model()
is not named model "because it returns ember-data models"Route.model()
is not 1:1 with an ember-data model and remove confusion about whether routes are allowed to have more than one modelstore.find
model()
hook works and demystify how to request data withember-data
ember-data
to drop the long vestigialstore.find
methodstore
is available but not the right store inengines
when folks forget to wire up storeember-data
to kill the eager initializer and eager instance-initializer necessary to overridedefaultStore
(prevents tree shaking, is a perf hit when apps don't need ember-data to render the entry route, and limits ember-data's ability to evolve the Store's APIs)store
injection, instead of magical injection onroutes
andcontrollers
ember-data
may be adopted incrementallyFor folks that want this magical behavior, an optional addon that reopens route with either a "DefaultStore" mixin or an "ember-data route store" mixin would be more in keeping with being leaner and more explicit.
The text was updated successfully, but these errors were encountered: