Last active
February 11, 2022 09:42
-
-
Save archi14/6567fdf654f9d812a4449f5d1830a461 to your computer and use it in GitHub Desktop.
action-creator
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
export const generateRandom = () => { | |
// An action, which return a new random number. | |
return { | |
type:'GENERATE_NUMBER', | |
payload:parseInt(Math.random()*100) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment