0

React Native Debugger Inspector is not showing any actions after @@INIT

My app is working fine, with the Redux state being updated correctly on dispatch of actions. The State tab shows the correct state values but the Inspector is only showing the very first action @@INIT. It used to show all the actions as they came in but I am not sure what I did to change this behavior. Anyone have ideas on what might be going on?

Anand
  • 1
  • I'm guessing this has something to do with multiple instances of my app running. Under Autoselect instances, I always see 2 instances listed. But the actions don't seem to show up in either one. – Anand Sep 02 '22 at 23:36
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 03 '22 at 07:26

1 Answers1

0

I figured this out. I was creating my Redux store inside my root App component, so it was creating a new store on every re-render of the App. I moved the create store function call outside my component tree and also used a useEffect to call my initial dispatch to set the initial state values. Now I only have one instance of the store in RNDebugger and things seem to be working fine.

Anand
  • 1