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
// 1. App will pass a prop to Form | |
// 2. Form is going to pass a function down to button | |
// that closes over the prop it got from App | |
// 3. App is going to setState after mounting and pass | |
// a *new* prop to Form | |
// 4. Form passes a new function to Button, closing over | |
// the new prop | |
// 5. Button is going to ignore the new function, and fail to | |
// update the click handler, submitting with stale data |