-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to import the constants of the action-types #90
Comments
@ondrasak I'm not sure that I fully understand your proposal. Could explain it in a bit more detail? |
let say I want the behaviour: so in some redux-middleware (i my case redux-observable) -> I will check all action if their type is equal to '@@reduxUiRouter/$stateChangeStart' -> if YES then perform desired action so I need to get somehow the string "@@reduxUiRouter/$stateChangeStart" would be great to have ability to import that constant import {STATE_CHANGE_START} from "redux-ui-router"
// or
import {actionTypes} from "redux-ui-router" // -> actionTypes.STATE_CHANGE_START |
I understand now. As opposed to maintaining those constants externally. I may get round to this in a week or so but open to a PR in the meantime 👍 |
Yes, agreed I currently have to redefine the ui router action types in my app. |
Actually, a slightly more stable hack than defining them yourselves is to use the action creators: const STATE_GO = stateGo().type |
Incidentally, you might want to change your namespacing - it breaks https://github.com/wix/redux-saga-tester/blob/master/src/SagaTester.js#L45 |
Would be great to have ability to import the constants of the action-types .
Use case:
I want to listen on some action and perform side-effect
now I need to hardcode the name of the action
The text was updated successfully, but these errors were encountered: