Last active
November 9, 2017 11:24
-
-
Save yuschick/02d66c473151fabe402e308936b46441 to your computer and use it in GitHub Desktop.
Accessible Web Apps with React, TypeScript & Ally.js
This file contains 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
interface Handle { | |
disengage(): void; | |
} | |
class Dialog extends React.Component<Props, {}> { | |
dialog: HTMLElement | null; | |
disabledHandle: Handle; | |
componentDidMount() { | |
this.disabledHandle = Disabled({ | |
filter: this.dialog, | |
}); | |
} | |
componentWillUnmount() { | |
this.disabledHandle.disengage(); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment