Question is pretty simple as the topic title says. I can’t figure out how to share state store between panels so that if I click something on one panel, something would change on the other.
What I have now, is:
// index.tsx
entrypoints.setup({
commands: {showAbout},
panels: {
panel1: PanelController(<App currentPanel="panel1"/>, flyOuts['panel1Flyout']),
panel2: PanelController(<App currentPanel="panel2"/>, flyOuts['panel2Flyout']),
panel3: PanelController(<App currentPanel="panel3"/>, flyOuts['panel3Flyout'])
}
})
And then
// App.tsx
export default ({currentPanel}: {currentPanel: string}) => {
const store = createStore(getStoreState(currentPanel))
return (
<StoreProvider store={store}>
<Panel/>
</StoreProvider>
)
}
So each panel has its own store. How do I share a single store among all three?