≈ the.bay.news

Our whole hooks directory is 68 lines: a confirm dialog that takes a callback instead of returning a promise

DEV Community
Our whole hooks directory is 68 lines: a confirm dialog that takes a callback instead of returning a promise
Two files, two hooks, 34 call sites. The confirm hook never resolves a promise, because the dialog closes on the click and the result arrives as a toast. The action hook is 18 lines and depends on React 19 keeping a transition pending across an await.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.