A
A
Andrew2017-07-24 23:48:02
redux
Andrew, 2017-07-24 23:48:02

Why is the component not updated if the same object is returned in the reducer but with different data?

Why is the component not updated if the same object is returned in the reducer but with different data?
https://github.com/reactjs/redux/blob/master/src/c...
where is this done in the readax? I don't see any check, no condition that subscribers should not be called if the reducer returned the same object

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2017-07-25
@gadfi

You can’t mutate data, this is a redux concept, data is checked by links
If it’s more convenient for you to work with mutable data, then look towards mobx, but immutability has never caused a problem for me PS
in the light of es6 it’s not much needed, but suddenly you will like it https://facebook .github.io/immutable-js/docs/#/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question