the An and B codes of both models are the same, as follows:
export default {
namespace: "A B ",
state: {}
effects: {
*add({payload}, {call, put}){
console.log("")
yield put({
type: "add",
payload:{
payload
}
});
}
},
reducers:{
add(state, action){
console.log("state")
return state;
}
}
};
When using , it is not introduced at the same time. When I call a component, I print the above two contents in an endless loop.
if I am not in effects
call put
, there will be no endless loop.
I would like to ask all of you to answer the reason for this. Thank you.