reduxjs / redux

A JS library for predictable global state management
https://redux.js.org
MIT License
60.88k stars 15.27k forks source link

Changing a value from null to false / false to null doesn't trigger a rerender #2260

Closed GautierT closed 7 years ago

GautierT commented 7 years ago

Hi. I'm using redux-form to manage my input. When i change a value with input.onChange() from null to false i can see the change in the store. (It's the same for false to null) image image

But the component is not rerender. and shouldComponentUpdate is not called either. Is this normal behavior ?

P.S : Changing from null to true does trigger a rerender and true to false too.

markerikson commented 7 years ago

It's difficult to say anything without seeing actual code. The usual reason for this is accidental mutation in a reducer, per http://redux.js.org/docs/faq/ReactRedux.html#react-not-rerendering . Since this is almost definitely not a bug with Redux itself, it should really be asked over on Stack Overflow instead.