React toggle button state. This avoids stale state enclosures in callbacks.