Relay: We will have an useSubscription hook?

Created on 19 Feb 2020  路  3Comments  路  Source: facebook/relay

Like useMutation, useLazyLoadQuery and usePreloadedQuery we will have an useSubscription?

Most helpful comment

All 3 comments

this is a simple useSubscription hook

https://gist.github.com/sibelius/a5e233d908928d4ab45e5924bf69df88

I think you can add config to array dependencies of useEffect to make it more correct

Yes, we're working on adding a useSubscription hook :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

derekdowling picture derekdowling  路  3Comments

jstejada picture jstejada  路  3Comments

HsuTing picture HsuTing  路  3Comments

fedbalves picture fedbalves  路  3Comments

brad-decker picture brad-decker  路  3Comments