codejump

Frontend Architecture (RADIO) — Series 3

Preview — 3 of 10 questions

Two mounted components share one deduplicated fetch. One unmounts while the other still needs the result. How should cancellation be managed?

AKeep every completed request active until page navigation.
BCancel the network request only when no subscriber needs it.
CLet either component cancel the shared request unconditionally.
DStart a separate duplicate request on every unmount.

A server-rendered component prints the current time during rendering. The client renders a different time before hydration finishes. What design prevents this mismatch?

AHydrate with the server value, then update on the client.
BFetch the time independently on both sides without synchronization.
CSuppress every hydration warning throughout the application.
DGenerate a fresh random key for the component on hydration.

An offline-first app tells the user a document is available offline immediately after starting a cache write. The tab closes and the document is missing next time. What completion boundary was overlooked?

ARecord the document URL in component state before closing.
BDisplay a success message as soon as the cache entry key is computed.
CWait only until the fetch response headers arrive.
DAwait durable local-write completion before promising offline availability.

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.