Questions tagged [redux-orm]
27 questions
16
votes
3 answers
Is it better to send normalized or denormalized API response back for React+Redux applications
I'm writing a react-redux application. At the beginning it calls a single endpoint, which returns a good amount of data as a heavily nested JSON. I then normalize it and put it into my redux-orm schema.
To me it seems silly to create the nested…

NateW
- 2,856
- 5
- 26
- 46
6
votes
3 answers
Rewrite redux-orm reducer with redux-toolkit
Issue (tl;dr)
How can we create a custom redux-orm reducer with redux-toolkit's createSlice?
Is there a simpler, recommended, more elegant or just other solution than the attempt provided in this question?
Details
The example of a custom redux-orm…

mrkvon
- 3,507
- 2
- 21
- 26
3
votes
0 answers
Redux-ORM, with ReactJS Selector is not returning value
ORM, I am able to add values to state but, I am not able to retrieve values from the selector. The following is the code.
When I try to add a new record, the record gets saved in the store but,
I am not able to get data into table component from the…

Gokul Krishna
- 31
- 1
3
votes
2 answers
Model Class definiton using redux-orm and TypeScript
I'm using redux-orm with JS and all is working ok, but I having problems translating my code from JS to TypeScript.
I already implemented the method render() in my Folder Model Class, but the TS transpiler says:
Property 'name' does not exist on…

Matias Benedetto
- 331
- 2
- 8
3
votes
1 answer
"map is not a function" with redux-orm 0.9.0
I'm creating a simple example to learn the redux-orm library. I've set up my reducer as below and everything seems to work great.
const orm = new ORM();
orm.register(Profile, User);
export function reducer(state, {type, payload}) {
const session =…

Jon Gunter
- 1,864
- 2
- 15
- 21
3
votes
1 answer
How to map API response to database state in Redux-orm
I am trying to directly map API response to my Redux-Orm models. I have two models:
Product hasMany ProductProperties
ProductProperty belongsTo Product
The API response I receive is:
{
products: [
{name: 'P1', id: 1},
{name: 'P2', id:…

Nerve
- 6,463
- 4
- 29
- 29
2
votes
1 answer
Selectors with React + Redux-ORM. Passing data to subcomponents
I've got a React application and I'm trying to use Reux-ORM and I'm struggling with selectors. I've got a simple app with normalized data
// /models/team.js
import { Model, many, attr } from 'redux-orm';
import Player from './player';
class Team…

Tim
- 113
- 9
2
votes
1 answer
Many() relationships with same model in redux-orm
What I need is to model Member have a list of followers and followings.
1
vote
0 answers
How to use redux-orm with redux and redux-toolkit
It's so funny that I'm using redux-orm but found it's hard to work with react-redux (though it's called redux-orm) on my end.
I got TypeError: Cannot read property 'Article' of undefined by using your method.
Let me sidetrack this question a little…

newBike
- 14,385
- 29
- 109
- 192
1
vote
0 answers
Error when deleting Redux-ORM model instances (many-to-many)
I'm using Redux-ORM to store relational model data in a react project I'm building.
There are two models; Site and Document. The relationship between them is many-to-many. The relationship is defined in the Document Model.
export class Site extends…

Mike Skinner
- 191
- 1
- 7
1
vote
1 answer
Formik & ReduxORM & Yup - validationSchema issue
I'm trying to use a Formik form with a Yup validation schema to edit an entity which come from my ReduxORM session. The validation does not seem to work properly when using a ReduxORM model.
I think it's a Formik issue because I succeed to validate…

Maxime TUAL
- 83
- 9
1
vote
1 answer
How to structure the Model for Redux ORM
I'm getting the response similar to the following format from server.
{"channels": [{"name":"discovery", "id":"12",
"details":{"src":"link", "logo":"imagelink"}}]
I'm planning to use Redux-Orm to manage the state in the store. When…

Ramesh K
- 77
- 1
- 6
1
vote
1 answer
Redux-orm linking constraints on dispatch
Trying to understand redux-orm . Have been reading up on
and https://github.com/tommikaikkonen/redux-orm and
http://blog.isquaredsoftware.com/2016/10/practical-redux-part-1-redux-orm-basics/
I have two classes Author and Book
Now when i dispatch…

user581157
- 1,327
- 4
- 26
- 64
1
vote
1 answer
How to update a model's "meta" state with latest redux-orm version (0.9.x)?
I'm trying to implement redux-orm and not sure of the best way to handle updating meta properties on my models. The return value of static reducers are ignored in the latest version, and looking through the API I can't see any way to modify the meta…

pilif
- 31
- 3
1
vote
1 answer
How to get a one-to-many field as an array in redux-orm
I have the following models for a chat application using redux-orm. Each Conversation contains many Messages, but one message can only belong to a single Conversation:
export class Message extends Model {
static modelName = 'Message';
static…

Jon Gunter
- 1,864
- 2
- 15
- 21