473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

unable to use custom configuration for effect for the plugin redux-offline

1
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:
Expand|Select|Wrap|Line Numbers
  1. offline(...offlineConfig, {
  2.        effect: (effect, action) => {
  3.          console.log("Executing effect");
  4.        }
  5. }
The control comes to the above code after executing the code below(as expected):
Expand|Select|Wrap|Line Numbers
  1. meta: {
  2.    offline: {
  3.       effect: { url: 'xyz',method: 'POST', body:content },
  4.       commit: {..},
  5.       rollback: {...}
  6.    }
  7. }
It then throws an error: Cannot read property 'then' of undefined at line:
Expand|Select|Wrap|Line Numbers
  1. return config.effect(metadata.effect, action).then(function (result) {
  2.  
The code works fine if i remove the configuration for effect. Any help?
Jul 2 '20 #1
0 2096

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: rdcpro | last post by:
In reading MSDN docs on creating custom Configuration sections, I found this page: ...
3
by: Laser Lu | last post by:
Hello, everybody, In order to avoid making web.config lengthy, I just moved some custom configuration settings out from web.config, and centralized them into an xml file, which names data.config....
3
by: Jason Richmeier | last post by:
Is it possible to create a custom configuration file (other than app.config) that can be processed by classes in the System.Configuration namespace? I have seen a ton of articles that talk about...
6
by: Jeff Hegedus | last post by:
I have a dll that requires some configuration data. I put the configuration data in a custom configuration section in a config file that is loaded in the installation folder of the dll. If I...
7
by: =?Utf-8?B?RG91Z2llIEJyb3du?= | last post by:
Hi I've written custom configuration section (inherits from System.Configuration.ConfigurationSection) to simplify the contents of the config file and to make life easier when accessing them in...
0
by: =?Utf-8?B?UGhpbGlw?= | last post by:
I have a web.config custom configuration section using asp.net 2.0 configuration APIs. My custom configuration section inherits from System.Configuration.ConfigurationSection. I have a IIS root...
4
balabaster
by: balabaster | last post by:
Okay, I decided that I needed to understand the whole custom configuration file bits and so I've spent some time playing around with it. It seems (in the most) relatively straight forward. However,...
1
by: =?Utf-8?B?SmFzb24gUmljaG1laWVy?= | last post by:
This may have been addressed in another post but I was unable to find what I was looking for. I am trying to create a custom configuration section that is element-centric instead of...
4
by: David Williams | last post by:
I am familiar with creating custom configuration settings and accessing them. However, for a current requirement, I need to control the various settings in my custom configuration section by...
2
by: raghulvarma | last post by:
Hi, I need to have a custom connection string in the web.config because I need to ping to Database only during day time say between 8AM and 5 PM, because of this I thought of creating custom...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.