Skip to content

Model Selector should return Model Instance instead of ref - #889

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

alessandro308 wants to merge 1 commit into
redux-orm:masterfrom
domotz:make_selectors_to_return_model_instances

Conversation

@alessandro308

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
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