Skip to content

Conversation

@evpozdniakov
Copy link

Please check my homework 2

};

componentDidMount() {
history.push(this.props.authorized ? '/people' : '/auth/signin')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а если статус может(и будет) позже меняться. Стоило делать в утке

export default App
export default connect(state => ({
authorized: userAuthorized(state)
}), null, null, { pure: false })(App)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь pure: false не нужен


};

shouldComponentUpdate(nextProps) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вот этого совсем не понял

payload: {user},
})

yield call([history, history.push], '/people')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

возьми push как AC из react-router-redux, сделай put

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants