Single Action Helper

Last updated 6 months ago

We also expose a helper to generate a store module for quick single action setup (eg. a basic fetch).

const url = 'https://foo.com/users/:id';
export const {types, actions, rootReducer} = createResourceAction({
name: 'environment',
method: 'GET',
url,
headers: {
Authorization: `Bearer ${apiJwt}`
},
credentials: 'include'
});