Skip to content

Instantly share code, notes, and snippets.

// 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