I am working on a project that brings a ton of data from one endpoint to one gearbox. I would like to convert this data to ES6 classes, so I can give them a helper method, ensure the relationship between the data and not work with regular javascript objects all the time. Also, in order to get the relationship between the data, I have to do n-square calculations and slow down the external interface.
Here are the options I see:
1) Create a selector that connects to the redux repository. This selector could receive data from the gearbox and convert it to several ES6 classes that I defined. If the reducer receives new data that is different from each other, the selector recreates instances of ES6 classes.
2) https://github.com/tommikaikkonen/redux-orm This also seems fantastic.
3) Create some selectors in the dataset that will calculate the specified relation in the dataset, so I can just call this selector every time I want to get the relation, which otherwise would be computing n-squares to get,
My question is which of the three should I take? Is there an alternative besides these 3? Or people just work with javascript objects mainly on the interface and do not deal with ES6 classes.
Update:
Two months later, and I'm still using Redux-ORM in production, and it's fantastic! Highly recommend.
Natew source share