Is it possible to map redux state to a regular javascript function rather than a React component?
If not, is there another way for connecting redux state to a function?
Suppose you have an action. Just add some marker - and the reducer will detect whether skip that or not:
Action:
{
type: 'SOMETYPE',
paylod: data,
shouldSkip: true
}
Reducer:
export default function ( state = {}, action ) {
if(action.shouldSkip)
return state
switch ( action.type ) {
case "OTHER_TYPE":
return action.payload;
default:
return state;
}
}