Skip to content

Instantly share code, notes, and snippets.

@runandrerun
Created December 8, 2018 19:21
Show Gist options
  • Save runandrerun/ae22fb664b52386d2228cbf05eda0d9d to your computer and use it in GitHub Desktop.
Save runandrerun/ae22fb664b52386d2228cbf05eda0d9d to your computer and use it in GitHub Desktop.
// before entering - no actions called
{
insideBodega: false, choppedCheese: 10, catMood: "Neutral",
}
// after entering - ENTER_BODEGA dispatched once
{
insideBodega: true, choppedCheese: 10, catMood: "Neutral",
}
// after buying two sandwiches - BUY_CHOPPED_CHEESE dispatched twice
{
insideBodega: true, choppedCheese: 8, catMood: "Neutral",
}
// after petting the bodega cat - PET_BODEGA_CAT dispatched once
{
insideBodega: true, choppedCheese: 8, catMood: "Happy",
}
// after leaving - LEAVE_BODEGA dispatched once
{
insideBodega: false, choppedCheese: 8, catMood: "Happy",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment