Ok, I can see that the fp-ts api was changed during the 2.0 update.
bimap is now its own function and not a property of Either anymore.
bimap
Either
It seems the correct implementation is now:
export class Remote<T> extends React.Component<RemoteProps<T>, RemoteState> { public render() { return ( <React.Fragment> { pipe(this.props.data, fold( l => { if (l === null) { return this.props.loading(); } else { return this.props.error(l); } }, r => { return this.props.success(r); })) } </React.Fragment> ); } }
@remojansen do you agree with this implementation?
gracias!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Ok, I can see that the fp-ts api was changed during the 2.0 update.
bimap
is now its own function and not a property ofEither
anymore.It seems the correct implementation is now:
@remojansen do you agree with this implementation?
gracias!