I am making use of the redux-offline plugin for offline first react-redux app. It works fine but I am facing issues with configuration.
I tried the code:
The control comes to the above code after executing the code below(as expected):
It then throws an error: Cannot read property 'then' of undefined at line:
The code works fine if i remove the configuration for effect. Any help?
I tried the code:
Code:
offline(...offlineConfig, {
effect: (effect, action) => {
console.log("Executing effect");
}
}
Code:
meta: {
offline: {
effect: { url: 'xyz',method: 'POST', body:content },
commit: {..},
rollback: {...}
}
}
Code:
return config.effect(metadata.effect, action).then(function (result) {