Created
March 27, 2018 23:10
-
-
Save agenthunt/ac4bd5d421a11ac15305f41d9315773e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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