I have a situation where the props in a container with mapStateToProps are updating, the props in the component are updating (just a string), the component is re-rendering.... and componentDidUpdate is just not going off.
So here is my connect method:
export default connect(
state => {
console.log("token",state.Auth.idToken);
return {
token: state.Auth.idToken,
isLoggedIn: state.Auth.idToken !== null ? true : false
}
},
{login}
)(SignIn);
As you can see here, I take token with mapStateToProps, I then for debug purposes display this token in render function.
<div className="isoLoginContent">
{this.props.token}
</div>
So this token is empty at first, then when I update it using redux-saga and reducer, token correctly displays in render function, so component is re-rendering. But componentDidUpdate is not firing. I have no custom shouldComponentUpdate and I'm not using PureComponent. What else could be causing this?