You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an API that uses snake case for object keys (i.e. attr_name_here) that I would like to load into a model with camel case attributes (i.e. attrNameHere). Is there a way to to tell Redux-Orm to map incoming field names to a different model field name?
Model.fields = {
// works, but I want use camel case attribute names
attr_name_here: attr()
// does not work because Redux-Orm does not know to map
// attr_name_here to attrNameHere
attrNameHere: attr()
// Can I do something like this?
attrNameHere: attr({ sourceFieldName: 'attr_name_here' })
Thank you.
The text was updated successfully, but these errors were encountered:
I have an API that uses snake case for object keys (i.e. attr_name_here) that I would like to load into a model with camel case attributes (i.e. attrNameHere). Is there a way to to tell Redux-Orm to map incoming field names to a different model field name?
Thank you.
The text was updated successfully, but these errors were encountered: