DigitalDisaster DigitalDisaster - 1 year ago 101
React JSX Question

Accessing redux dispatch from deeply nested components

I'm using react-redux with the components. It passes dispatch as a prop into my top level component, but i'm having trouble accessing it from deeply nested (and some other more complexly mounted) components. What is the best way to access dispatch from any component? Do I need to pass it manually as a prop to every component I'd like to use it in?

Answer Source

You can use connect on components even if they are bellow some already connected components.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download