X Tutup
Skip to content

Model Selector should return Model Instance instead of ref#889

Open
alessandro308 wants to merge 1 commit intoredux-orm:masterfrom
domotz:make_selectors_to_return_model_instances
Open

Model Selector should return Model Instance instead of ref#889
alessandro308 wants to merge 1 commit intoredux-orm:masterfrom
domotz:make_selectors_to_return_model_instances

Conversation

@alessandro308
Copy link

Suppose I have a model like:

class Book extends Model {
   toString(){
       return `Name: ${this.name}, rating: ${this.rating}`;
   }
}

I want the selector like

const selectBook = createSelector(orm.Book)

to return the book as Book class instances instead of ref object.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

X Tutup