Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Update docs for using a different store key #1132
It's for a Chrome extension, and it grew out of some architectural particulars there.
We have a main store in the background page of the extension that's the final source of truth for all user data. Our UI is a React app which can be inserted directly into pages as an iFrame, and there might be several instances of the UI inserted into different tabs at once. We use the excellent
It can be confusing at times, but it has actually worked out rather well.
I haven't tried just yet, but I imagine it should be workable. I can create the context and pass it to the
Does that sound right?
That's working! I created a null context called
And I wrapped the
Then when I want to connect a component to the local store, I just do
So, in the end, very little change needed.