Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'request' of undefined #94

Open
banmarkovic opened this issue Nov 3, 2018 · 2 comments
Open

Cannot read property 'request' of undefined #94

banmarkovic opened this issue Nov 3, 2018 · 2 comments

Comments

@banmarkovic
Copy link

banmarkovic commented Nov 3, 2018

Anyone encountered this problem while trying to connect redux, axios and redux-axios-middleware in ReactNative app? For some reason I keep getting this error, it seems like something is wrong with
function loginWebservice(username, password) { return { type: LOGIN, payload: { request: { url: '/auth/login', method: 'POST', data: { 'name': username, 'password': password } } } } }

I configured axios client and I connected it with redux store.

Also error another error I received is undentified is not an object (evaluating 'setupClient.client.request')

@colinux
Copy link

colinux commented Dec 9, 2018

I had a similar problem in a multi client configuration one day because my import was wrong :

// OK :
import { multiClientMiddleware } from 'redux-axios-middleware'; 

// This won't work because this imports the default module, which behaves slightly differently 
import multiClientMiddleware from 'redux-axios-middleware'; 

@tangbao
Copy link

tangbao commented Jan 2, 2024

I had a similar problem in a multi client configuration one day because my import was wrong :

// OK :
import { multiClientMiddleware } from 'redux-axios-middleware'; 

// This won't work because this imports the default module, which behaves slightly differently 
import multiClientMiddleware from 'redux-axios-middleware'; 

Thanks, this is helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants