miragejs / discuss

Ask questions, get help, and share what you've built with Mirage
MIT License
2 stars 0 forks source link

Use ES Classes instead of Backbone extend #27

Open samselikoff opened 5 years ago

samselikoff commented 5 years ago

image


3 upvotes from Canny

NullVoxPopuli commented 4 years ago

any updates on this? I'm just getting to try mirage, and the extend APIs are ..... rough

For example:

import { Model, hasMany, belongsTo } from 'ember-cli-mirage';

export default class MiragePost extends Model {
  @belongsTo('user') author;

  @belongsTo subreddit;

  @hasMany('comment') comments;
}

kind of like what ember-data done for their relationship macros

samselikoff commented 4 years ago

No updates yet but getting rid of our extend module is high priority. Will be at top of list when we're done with the homepage after "launching" miragejs.

For now I would not use ES6 classes at all with Mirage + just stick with .extend as in the docs 👍

samselikoff commented 4 years ago

FYI: Transferred this to our Discuss repo, our new home for more open-ended conversations about Mirage!

If things become more concrete + actionable we can create a tracking issue in the main repo.