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  What is Redux used for?

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  What is the difference between context and Redux?

Leave a Reply

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