Skip to content
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 default store and record loading in Ember route #773

Closed
snewcomer opened this issue Nov 14, 2021 · 1 comment · Fixed by #774
Closed

Deprecate default store and record loading in Ember route #773

snewcomer opened this issue Nov 14, 2021 · 1 comment · Fixed by #774

Comments

@snewcomer
Copy link
Contributor

snewcomer commented Nov 14, 2021

With #508 and ultimately removing the ember-data store injection here, the use of the default store👇 is uncommon and in some (many?) cases, error prone. This is further complicated that Ember Data Model class instances don't have a find method, thus causing an assertion.

We should deprecate the default store to

https://github.com/emberjs/ember.js/blame/017b11e2f58880869a5b8c647bf7f3199fc07f26/packages/%40ember/-internals/routing/lib/system/route.ts#L1729-L1760

Motivation

Confusion. Comment from an RFC...

BIG fan of this RFC. A few weeks ago I spent half a day trying to figure out why our app was doing an unexpected request, until I stumbled upon this gem of functionality

Notes

This RFC does not intend to remove the default model hook and findModel. Although this is entirely possible to expand this RFC to include this if people so desire. Otherwise, I'd be happy to open a new RFC to accomplish this.

@snewcomer snewcomer self-assigned this Nov 14, 2021
@snewcomer snewcomer changed the title Deprecate default store in Ember route Deprecate default store and record loading in Ember route Nov 14, 2021
@wagenet
Copy link
Member

wagenet commented Jul 23, 2022

Closing since there's an associated RFC.

@wagenet wagenet closed this as completed Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants