D
D
Dima Zherebko2017-03-05 00:41:54
React
Dima Zherebko, 2017-03-05 00:41:54

How to correctly implement sorting and sorting in redux for large amounts of data?

There is a large date set (1-10kk) of entities, it is necessary to perform sorting, filtering, and so on.
Now it works like this: a request is made => we get some part of the data and store it in redux => display it.
If filters are needed, then we make the same request and overwrite the old data that is without a filter.
Does it make sense for such data to save entities for which a request has already been made. If yes, how to organize it correctly.
Now it looks like this

entities: {
 [entityName]:{
[id]:value
}
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2017-03-05
@miraage

https://github.com/paularmstrong/normalizr
https://github.com/reactjs/reselect

M
Maxim, 2017-03-05
@maxfarseer

I support, Mikhail Osher about normalizr. This is well explained (in English) in this course: Building React Applications with Idiomatic Redux .
Link to a lesson about normalizr inside this course.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question