Answer the question
In order to leave comments, you need to log in
How to refer to the state of the editor from App.js?
I want to make a check in App.js, if the isLogged state in the reducer == false, then display the authorization window, otherwise something else
{ store.auth.state.isLogged
? <AuthContainer/>
: null
}
Answer the question
In order to leave comments, you need to log in
Initialize the store in index.js and wrap the App in a provider and you will have access to the store from the App
ReactDOM.render( <Provider store={store}><App /></Provider> , document.getElementById('root'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question