First, react-select is slick! It's been awesome to work with. I've been wanting to make some bugfixes, but have ended up with my hands tied because of a few things that are hard to reason about. This list also contains some other notes:
@JedWatson @dcousens What are your thoughts on these? I almost started on a lot of these today, but it'll create a lot of merge conflicts on existing PRs and be a little risky w/o tests.
First, react-select is slick! It's been awesome to work with. I've been wanting to make some bugfixes, but have ended up with my hands tied because of a few things that are hard to reason about. This list also contains some other notes:
componentWillMount? It's triggered on the server, so callingautoloadAsyncOptionsand such here seems strange. Also, I'm not surethis._bindCloseMenuIfClickedOutside = ...etc are assigned in this way here?"options"prop to be immutable. Whenever a prop changes, there's twoJSON.stringifycalls incomponentWillReceivePropsthat are expensive for large datasets. It'd be more efficient if there could just be a strict equality check here.setStatecalls? React will batch these so I think's a bit moot and leading to more problems than it's solving? It's tough to track down where events are bound/unbound....spreadin cases like these.thiscontext matter on callbacks? E.g.callback.call(this, {});All React element methods are auto-bound already.onChangeevents. It feels very weird to cast an ID to a string for<Select>then cast it back to a number.@JedWatson @dcousens What are your thoughts on these? I almost started on a lot of these today, but it'll create a lot of merge conflicts on existing PRs and be a little risky w/o tests.