Closed sho13 closed 7 years ago
@sho13 can you send missing parts of how you setup redux with middleware?
@svrcekmichal
const createStoreWithMiddleware = applyMiddleware(axiosMiddleware(client), promise)(createStore);
is this what you mean?
@sho13 yes, can you send whole file with imports etc?
I apologize, NDA restricts me from doing so.
ok can you at least send how you import what's used in snippet above? at least axiosMiddleware
, client
Sure,
import axiosMiddleware from 'redux-axios-middleware';
client::
module.exports = {
client: axios.create({
baseURL: 'http://localhost:5000',
responseType: 'json',
timeout: 5000,
}),
}
that's client export, not import
import client from './utils/axiosconfig.js';
but you are not using default
export in that export snippet, you are using named export client
can you try change import to import {client} from './utils/axiosconfig'
another option is to change the export to default
oh shit... you're right. thank you -_-
great :) don't worry, will close this issue
Hi,
I'm getting ^ that error from::
and in my action it looks like this::
but i get an error that says ::
the index file with this stuff is::
is there something i'm doing wrong?