Maybe I'm doing something wrong here, or maybe no one else has tried, but not sure how/if I'm the only one who has faced this issue..
I've got a component with the following method (set up this way since the component is one of many in a list, and want to keep track of requests per item in list):
export function * deleteTodos (api, action) {
const { data } = action
// get current data from Store
// const currentData = yield select(DeleteTodosSelectors.getData)
// make the call to the api
const response = yield call(api.deleteTodos, data)
// success?
if (response.ok) {
// You might need to change the response here - do this with a 'transform',
// located in ../Transforms/. Otherwise, just pass the data back from the api.
yield put(DeleteTodosActions.deleteTodosSuccess(response.data))
yield put(TodosActions.removeTodos(data))
} else {
yield put(DeleteTodosActions.deleteTodosFailure())
}
}
What I'm seeing here is that the following method from utils.js on line 66:
Hey there:
Apologies if this is way out of scope for your module. My environment is pretty much:
react-native-cli: 2.0.1 react-native: 0.55.1 ignite: 2.1.0 (w/ ignite-ir-boilerplate-andross) redux-saga: ^0.16.0 redux-saga-thunk: 0.7.1 reduxsauce: 0.7.0 mac os: 10.13.5
Maybe I'm doing something wrong here, or maybe no one else has tried, but not sure how/if I'm the only one who has faced this issue..
I've got a component with the following method (set up this way since the component is one of many in a list, and want to keep track of requests per item in list):
And the basic map helper:
I've written my action creators like so using
reduxsauce
:And my saga:
What I'm seeing here is that the following method from
utils.js
on line 66:tries to pass a truthy value to the
_extend()
method which throws the following error:I was able to solve this one of three ways. One by returning just the
meta
object in thegetThunkMeta()
method:Two by wrapping the
thunk
in an object:Or three by adding an
{}
instead of atrue
to the action creatormeta
:This wasn't tested against anything else tho, so not sure of implications.. If feasible I'm happy to submit a PR.