Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state change doesn't cause re-render of connected component #37

Closed
bsr203 opened this issue Aug 8, 2015 · 3 comments
Closed

state change doesn't cause re-render of connected component #37

bsr203 opened this issue Aug 8, 2015 · 3 comments

Comments

@bsr203
Copy link

bsr203 commented Aug 8, 2015

Hi,

I have the following behavior after upgrading to 0.5.0

  1. I changed the @provide to use Provider
  2. didn't change connect for now
@connect(state => ({
 todos: state.todos
}))

Now, when component is mounted it calls the action to load the initial state

  componentDidMount() {
    this.props.actions.listTodos();
  }

component is rendered with default props

I could see the action causes the state to be populated

API_TODOS_QUERY
  dispatching Object {type: "API_TODOS_QUERY", payload: Array[4]}
  next state Object {ui: Object, todos: Array[4]}

but there is no re-render. The new state is shown in the UI (rendered by the component) next time. that is if the same button/nav item is clicked again or navigate away and back to the same screen.

Let me know what else needed to help me with this issue.

@gaearon
Copy link
Contributor

gaearon commented Aug 8, 2015

This is a regression in 0.5.0. It should be fixed in 0.5.3.
Better yet, upgrade to 0.6.0: https://github.com/gaearon/react-redux/releases/tag/v0.6.0

@gaearon
Copy link
Contributor

gaearon commented Aug 8, 2015

Please reopen if you still have this issue after upgrading.

@gaearon gaearon closed this as completed Aug 8, 2015
@bsr203
Copy link
Author

bsr203 commented Aug 9, 2015

It works great ... thanks

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

No branches or pull requests

2 participants