Skip to content

Commit 350493d

Browse files
docs: Clarify popstate handling in caching exercise
1 parent 11abcbc commit 350493d

File tree

1 file changed

+1
-0
lines changed
  • exercises/04.router/05.problem.cache/ui

1 file changed

+1
-0
lines changed

exercises/04.router/05.problem.cache/ui/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ function Root() {
6161

6262
// 🐨 change this to setContentKey(historyKey)
6363
startTransition(() => setContentPromise(nextContentPromise))
64+
// 🐨 otherwise, setContentKey(historyKey) directly (no transition needed)
6465
}
6566
window.addEventListener('popstate', handlePopState)
6667
return () => window.removeEventListener('popstate', handlePopState)

0 commit comments

Comments
 (0)