reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

Redux state subscription changes is empty on Timeline

Open GabrielLim-FastCo opened this issue 1 year ago • 2 comments

Describe the bug

I have followed the instructions to setup Redux on Reactotron. It is kinda working as I can see the redux state showing up on Subscriptions section of State tab. However, the Subscription changes on Timeline tab is just empty.

As attached a video that shows the issue:

https://github.com/infinitered/reactotron/assets/142763315/46457d71-a15f-469d-9620-6199fd96e12b

Reactotron version

5.1.7

GabrielLim-FastCo avatar Jun 06 '24 10:06 GabrielLim-FastCo

Same for us - everything works except the subscriptions in the timeline tab - the State are correctly updating in the State tab - not sure what we did wrong in the setup (we use redux connect api / redux-observable / redux-persist)

lwmouneyrac avatar Nov 14 '24 05:11 lwmouneyrac

We had a similar issue on our app, but we noticed that our redux store was being created within the App component possibly leading to the redux store getting re-created on every re-render. This seemed to also cause an issue with Reactatron not loading up the state values within the State tab.

Moving the definition of the store to outside the component fixed the issue for us 👍🏼

Before

const App = () => {
  return (
    <Provider
      store={createStore({
        thunkArgs: {
          platform: Platform.OS,
        },
      })}
    />
  );
};

After

const store = createStore({
  thunkArgs: {
    platform: Platform.OS,
  },
});

const App = () => {
  return <Provider store={store} />;
};

hamzahayat avatar Jan 08 '25 14:01 hamzahayat