Skip to content

Deprecate default store and record loading in Ember route #773

@snewcomer

Description

@snewcomer

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions