Do reducers need initial state compulsorily?

Just remember that your reducer should return some kind of initial state if the state given to it as the first argument is undefined. But you don’t want your initial application state to be undefined, so you have to initialize the state yourself .11 Nis 2020

Sizin İçin Seçtik  How do you use Redux for beginners?

Leave a Reply

Your email address will not be published. Required fields are marked *

Do reducers need initial state compulsorily?

Just remember that your reducer should return some kind of initial state if the state given to it as the first argument is undefined. But you don’t want your initial application state to be undefined, so you have to initialize the state yourself .11 Nis 2020

Sizin İçin Seçtik  Can I use setState with Redux?

Leave a Reply

Your email address will not be published. Required fields are marked *