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
/* | |
The goal of this is to show you how to abstract the action of tapping a button, | |
such that it can be triggered from some other code. In this case we trigger one | |
button's action from tapping another button... but the principle should carry | |
over if you are triggering it from somewhere else in the code as well, possibly | |
not related to a user button tap (maybe after a certain amount of time, or when | |
another state updates elsewhere in the code). | |
*/ | |
// this package provides the state management utilities we need for this magic to happen |