Well, i have created an chrome extention with create-react-app and its worked ok, but when i started to connecting default redux I noticed that redux actions correctly worked (I could see changes from Redux DevTools Inspector pangel) only locally (on 3000 port) and when I opened it from Chrome extension list and opened Redux DevTools i have seen that my store not exist (No store found), but I still could manipulating with store but he updating it after restart extention. Then I have decided to connect webext-redux package to overcome this problem. Doing everything according to the documentation.
1)Created an bacgkround.js file
2)Setup manifest.json with "background" and "browser_action"
3)Background.js
import {wrapStore} from 'webext-redux';
const store;
wrapStore(store);
4)Index.js
import {ReactDOM} from 'react-dom'
import App from './App'
import {Provider} from 'react-redux'
import {Store} from 'webext-redux'
const store = new Store();
store.ready().then(() => {
ReactDOM.render(
<Provider store={store}>
<App/>
</Provider>,
document.getElementById('root')
)
})
And after this manipulations I have opened my extention and saw in console error "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.". I spent the whole day to overcome this mistake, but I still couldn't solve it. And when I was looking for a solution to the problem, I came to the conclusion (thanks to #222) that the problem is the interaction between 'create-react-app' and 'webext-redux'. Is it possible to get webext-redux to work together with create-react-app?
Well, i have created an chrome extention with create-react-app and its worked ok, but when i started to connecting default redux I noticed that redux actions correctly worked (I could see changes from Redux DevTools Inspector pangel) only locally (on 3000 port) and when I opened it from Chrome extension list and opened Redux DevTools i have seen that my store not exist (No store found), but I still could manipulating with store but he updating it after restart extention. Then I have decided to connect webext-redux package to overcome this problem. Doing everything according to the documentation. 1)Created an bacgkround.js file
2)Setup manifest.json with "background" and "browser_action"
3)Background.js
4)Index.js
And after this manipulations I have opened my extention and saw in console error "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.". I spent the whole day to overcome this mistake, but I still couldn't solve it. And when I was looking for a solution to the problem, I came to the conclusion (thanks to #222) that the problem is the interaction between 'create-react-app' and 'webext-redux'. Is it possible to get webext-redux to work together with create-react-app?