tshaddix / webext-redux

A set of utilities for building Redux applications in Web Extensions.
MIT License
1.22k stars 180 forks source link

Access the store from popup and options #258

Open goldenlink opened 4 years ago

goldenlink commented 4 years ago

Hi, I have an extension where I want to access the data store from both options.js and popup.js.

In the background, I wrapStore(myStore). In both options and popup, I do create a store

const store = new Store();
store.ready().then(....)

It works in popup and options without trouble. But when I open options, and while the later is opened, open my popup, the popup fail to get access to the store.

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.%s the componentWillUnmount method in _temp (created by ConnectFunction) in ConnectFunction (created by _class)

How can I overcome this limitation ?

Thanks for your ideas.