react-inline-grid icon indicating copy to clipboard operation
react-inline-grid copied to clipboard

Usage within redux overwrite my app state

Open igoldny opened this issue 9 years ago • 4 comments

i'm writing redux app and if i wrap my app with Grid its overwrite my state and i get react-inline-grid state within my app

igoldny avatar Dec 01 '15 14:12 igoldny

i have used https://github.com/dowjones/react-cellblock it doesn't have overwrite state issue

kartikag01 avatar Oct 12 '16 13:10 kartikag01

Yeah seriously threw me for a loop, atleast put some disclaimer on the README

micahthomas avatar Mar 31 '17 15:03 micahthomas

Is there a workaround for this issue?

I posted a question on Stackoverflow (http://stackoverflow.com/questions/43927596/components-loose-access-to-store-when-wrapped-in-grid-react-inline-grid/) and someone directed me here.

Seems like the Grid's component provider is overwriting my App's provider.

sdee avatar May 15 '17 18:05 sdee

I don't think there is a easy workaround. You would need to pass in the store via another provider component or via props.

I ended up switching to react-flexbox-grid, it took some work but ended up being a simpler and reliable solution.

micahthomas avatar May 21 '17 16:05 micahthomas