Skip to content

Instantly share code, notes, and snippets.

View gist:fbc4f038076de8585c5d5a06c959282b
/*
The bug was aria-expended instead of aria-expanded and the toggle function should reverse the value of isOpen state.
i would improve it by destructuring the props children.
to sync this dropdown selection to the server app.sync should be at getDerivedStateFromProps()
*/
import React, {PureComponent} from 'react';
class Dropdown extends PureComponent {
constuctor(props) {