-
-
Save quicksnap/c3cd6b5c5e44918e80c57bb00e665e33 to your computer and use it in GitHub Desktop.
This file contains 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
function reducer(state: MyAppState, action: Action) { | |
// addToCart is our action creator *function* | |
if (isAction(action, addToCart)) { | |
const productIds = action.payload.productIds; // Safely typed! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment