3 ms·
this.setState({ isConnected: !!weAreConnected })
by debaserab2 9y ago
this.setState({ isConnected: !!weAreConnected })
- hypervis0r 9y agoThis^, plus, you shouldn't really have "null" or "undefined" variables which you treat as bool (if you do, then that's a bug)
- DeonPenny 9y agoDing ding ding right answer. This is the way most senior javascript devs would right it.
- corn13read 9y agoThey'd right it if they were fixing it or write it if they were writing it ;)