473,625 Members | 3,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

4 New Member
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?
Oct 6 '17 #1
0 1855

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

Similar topics

5
2274
by: rdcpro | last post by:
In reading MSDN docs on creating custom Configuration sections, I found this page: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfcustomelementfornamevaluesectionhandlerdictionarysectionhandler.asp At the very bottom, it says: Configuration File This element can be used in the application configuration file, machine configuration file (Machine.config), and Web.config files that are not at the
3
1586
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. It works fine except for one thing that the custom configuration file has a poor change awareness. Custom configuration settings can not be refreshed after the data.config file was modified. I wish the custom data.config file can works like the...
3
5616
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 custom sections (inside the app.config file) but I would like to make an entirely new config file. I opened a custom config file with the ConfigurationManager class but it seemd as if it ignored all of the content in the config file. Is there...
6
4800
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 install the dll to the same directory as the exe which uses it, everything works as expected but if I load the dll in any other directory, I get the following error... 2007-02-04 16:36:51,171 DEBUG CentrifugeBHO.CentrifugeBHO - dllPath =...
7
10820
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 code. The configuration section is contained within the exe (it's a simple test case!) and everything works well debugging within the IDE or if the application is deployed on a drive or share that has been granted full trust. For the share the...
0
1619
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 level web.config and an application level web.config, with the application web.config inheriting from the root level web.config. I am receiving the following message when compiling the web application... "....Section or group name...
4
2689
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, I've come unstuck with one scenario that I'm trying to figure out the code for: Consider the following configuration: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="DummySection"...
1
1622
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 attribute-centric (mostly out of preference). For example... <Date> <Year>2008</Year>
4
1656
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 virtual location of the pages accessing the configuration information. The best way that I know is to do this via the use of the location tag in the web.config. However, I can not seem to get the correct instance of the configuration section in my...
2
2088
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 configuration. so I tried creating a class which extends from the class ConfigurationSection, Please find the coding which I have done. class ExtendedConnection:ConfigurationSection { // Start time of Connection
0
8696
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7188
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6119
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1504
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.