Skip to content

Deprecate default store and record loading in Ember route #773

Closed

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.

Activity

  1. self-assigned this
    on Nov 14, 2021
  2. changed the title [-]Deprecate default store in Ember route[/-] [+]Deprecate default store and record loading in Ember route[/+] on Nov 14, 2021
  3. wagenet commented on Jul 23, 2022

    @wagenet
    Member

    Closing since there's an associated RFC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions