You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Async,Resolve,Reject,Finally}from'@axetroy/react-async';classAppextendsComponent{render(){return(<Asyncwait={Promise.resolve(data)}><Resolve>promise resolve</Resolve><Reject>promise reject</Reject><Finally>promise done, whatever it is reject or resolve</Finally></Async>);}}
有点类似Angular的Async管道
之前有写过类似的库
ng-promise, 根据promise的结果渲染不同的视图
现在要实现React版
初步拟定组件是这么用的
已完成
react-async
The text was updated successfully, but these errors were encountered: