Guest User

Untitled

a guest
Dec 10th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. export class VideoInfoBox extends React.Component {
  2. constructor(props) {
  3. super(props);
  4. this.state = {
  5. collapsed: true,
  6. };
  7. }
  8.  
  9. render() {
  10. /* ... */
  11. }
  12.  
  13. onToggleCollapseButtonClick = () => {
  14. this.setState((prevState) => {
  15. return {
  16. collapsed: !prevState.collapsed
  17. };
  18. });
  19. }
  20. }
Add Comment
Please, Sign In to add comment