Redux-thunk has a feature where you can inject a custom argument.
I think this library can support the same feature if it were implemented like so:
helpers/useThunkReducer.js
import { withExtraArgument } from 'react-hook-thunk-reducer';
import BrowserApp from '../BrowserApp';
export default withExtraArgument({ app: new BrowserApp() });
An implementation of this might look like thus:
const saveData = (dispatch, getState, { app }) => {
app.localStorage.setItem('data', JSON.stringify(data));
};
Redux-thunk has a feature where you can inject a custom argument.
I think this library can support the same feature if it were implemented like so:
helpers/useThunkReducer.js
An implementation of this might look like thus: