A tool for people curious about the React Server Components protocol rscexplorer.dev/
rsc react
35
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix transition in pagination sample (#4)

authored by

Billy Janitsch and committed by
GitHub
99cfda19 01522310

+5 -3
+5 -3
src/client/samples.ts
··· 271 271 const formAction = () => { 272 272 startTransition(async () => { 273 273 const result = await action(cursor) 274 - setItems(prev => [...prev, ...result.newItems]) 275 - setCursor(result.cursor) 276 - setHasMore(result.hasMore) 274 + startTransition(() => { 275 + setItems(prev => [...prev, ...result.newItems]) 276 + setCursor(result.cursor) 277 + setHasMore(result.hasMore) 278 + }) 277 279 }) 278 280 } 279 281