Skip to main content
The zone read exists so that the first screen can be specific. Instead of “add a TXT record”, it can say “in Cloudflare, go to DNS → Records, and this usually publishes in about a minute”. This guide builds that screen.

The shape of the hook

The read streams two frames, and the first one is the useful one. Render as soon as it lands rather than waiting for both.
hooks/useZoneRead.ts
Aborting on unmount matters: the server stops the lookup when the request is aborted, so a visitor who types a second domain does not leave the first read running.

Consuming the frames

What to render, in order

1

Nothing yet — a skeleton

Both frames are null. This is short; do not put a spinner with a paragraph of text under it.
2

Delegation lands — name the provider

You now have provider and nameservers. This is the moment the screen becomes worth reading: show the provider’s own wording for the fields, and its own screenshot if you have one.
provider is other for anything unrecognised. That is a normal answer — fall back to generic instructions naming the nameservers you did find, which is still more than most products show.
3

Publishing lands — set the expectation

Both numbers are nullable. Render the sentence for whichever you have.

Say what you normalised

domain.normalisations is an array of what was done to the input. Showing it prevents the worst kind of confusion — reading a different name than the one the person typed, silently.
Handle isPublicSuffix separately: co.uk is not a domain anyone can own, and the right message is “that is a public suffix, try the name in front of it”, not a DNS error.

Failures

Four, and only one of them is worth a retry button.
A network failure reaching ownsi at all is a fourth case your client owns, not one the API returns. Give it its own code so the retry logic can treat it like unresolvable.