relay icon indicating copy to clipboard operation
relay copied to clipboard

Support React 19 `use`

Open tien opened this issue 8 months ago • 2 comments

React 19 provided the use function to consume promise directly. Does relay intend to provide option to return promise from hooks instead of suspending?

tien avatar Jun 10 '25 03:06 tien

I suspect our use of use will be simply as an implementation detail to replace throwing a promise. Is there something specific you were hoping to achieve by having direct access to the promise and being able to use it yourself?

Jordan Eldredge

jordaneldredge.com

On Mon, Jun 9, 2025 at 8:41 PM Tiến Nguyễn Khắc @.***> wrote:

tien created an issue (facebook/relay#5016) https://github.com/facebook/relay/issues/5016

React 19 provided the use function to consume promise directly. Does relay intend to provide option to return promise from hooks instead of suspending?

— Reply to this email directly, view it on GitHub https://github.com/facebook/relay/issues/5016, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABHXLZ6QMDL4GMZJODAEWD3CZHVLAVCNFSM6AAAAAB66PL24KVHI2DSMVQWIX3LMV43ASLTON2WKOZTGEZTEMBUGE2DGMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

captbaritone avatar Jun 11 '25 06:06 captbaritone

Nothing specific that I've in mind tbh, I'm just curious as to how you guys would utilise the new API 👀

tien avatar Jun 11 '25 07:06 tien