kuzn-ilya / react-async-call

Declarative promise handling in React
MIT License
10 stars 2 forks source link

add prop `status: 'running' | 'ready' | 'rejected'` to root render prop #7

Open kitos opened 6 years ago

kitos commented 6 years ago

I believe it would be handy in some cases use one flag instead of several

kuzn-ilya commented 6 years ago

I agree, it makes sence. But there is no direct mapping between boolean flags like running and proposed statuses. E.g. it's possible to have ready-to-use result and to execute promise-returning function at the same time. What should be returned as a status in such a case?

kuzn-ilya commented 6 years ago

@kitos, Are you still believe that proposed change will be useful?

kitos commented 5 years ago

Sorry for not responding for a long time 😄 Yes I still believe it would be nice to have a render prop with api similar (or even qual) to react-apollo Query.