Skip to content

[HMR][Redux] Updating reducer code disconnect the app from the store #16148

Description

@Fr33maan

Is this a bug report?

Yes it might be, it's now 10 hours I'm trying everything to get rid of it but I still don't understand what is going on.

Have you read the Contributing Guidelines?

Yes

Environment

OS: Linux 3.16
Node: 8.2.1
Yarn: 0.27.5
npm: 5.3.0
Watchman: 4.7.0

Packages: (wanted => installed)
react-native: 0.48.4 => 0.48.4
react: 16.0.0-alpha.12 => 16.0.0-alpha.12

Target Platform: Android (6)

Steps to Reproduce

(Write your steps here:)

  1. Click on the button, action gets dispatched and component is updated
  2. Edit and save App/Redux/SearchRedux
  3. Click on the button, actions gets dispatched and component is NOT updated

Expected Behavior

After editing a reducer, I would expect my component to still gets store updates and rerender if the connected state changes.

Actual Behavior

The component is not updated once I've edited and saved a reducer. I must restart the server to reconnect the Component to the store.

Reproducible Demo

git clone https://github.com/l1br3/ReactNative-Redux-HMR-Broken
npm run freshInstall

If use of iOs, look at the script in package.json.

I suspect react-navigation to be responsible of that because HMR does not support functionnal components but as HMR globally works, maybe it's just a ReactNative bug.
#13240

I tried many things bug I cannot get it work. I've also posted a question on SO in case it's just a misconfiguration but the more I dig into it, the less I understand what happens.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions