3 ms·
Or with an algebraic Maybe data type {this.state.user.case({ some: user => `Hello ${ user.name }` none: () => `Please log in` })} Or for async req
by spion 10y ago
Or with an algebraic Maybe data type
{this.state.user.case({
some: user => `Hello ${ user.name }`
none: () => `Please log in`
})}
Or for async requests that are in progress, an algebraic 3-state type:
https://twitter.com/Tholle1234/status/804796967222202372 https://twitter.com/Tholle1234/status/804796967222202372