A reducer is a function that, when bound to the store, will be called regardless of what action has been dispatched, so it always has to accommodate for unexpected action types. By far the most common way to do this is to do nothing, which in (state, action) -> state
kind of function signature means just returning the state itself without any changes:
switch (action.type) {
case ABC: do something; break;
case XYZ: do something; break;
default: return state; // <- default "response" to actions that aren't handled by code above: stay chill, do nothing, return the state as is
}
The action @@redux-saga-test-plan/INIT
is internal for the redux-saga-test-plan
lib. Because there is no way an action, once dispatched, can be skipped or hidden from the workflow (or developer tools), you might have seen many actions of types that look similar to that one. Don't worry, those are most likely used by libs themselves and don't require any specific handling from your side.