Skip to content

Instantly share code, notes, and snippets.

@agenthunt
Created March 27, 2018 23:10
Show Gist options
  • Save agenthunt/ac4bd5d421a11ac15305f41d9315773e to your computer and use it in GitHub Desktop.
Save agenthunt/ac4bd5d421a11ac15305f41d9315773e to your computer and use it in GitHub Desktop.
import { createStar } from 'redux-nakshatra';
export const { rootSaga, types, actions, rootReducer } = createStar({
name: 'users',
http: {
url: 'http://localhost:5000/users',
generateDefault: true,
add: {
findUsersByLastName: {
method: 'get'
}
}
}
});
// And Provide query params when invoking the action
actions.findUsersByLastName({
params: {
lastName: 'Andersson'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment