Grokking React Advanced
Vote

0% completed

​

Concurrency with useTransition

The log below comes from the product search from the previous lesson, after a single change: the list's state update is wrapped in startTransition. We changed the input from empty to "sho" in one event, as a paste would, and that one change produced two renders of ProductSearch instead of one.

ProductSearch render query="sho" listQuery="" isPending=true ProductSearch render query="sho" listQuery="sho" isPending=false ProductList render query="sho" rows=40

In the first render the input already shows "sho", but the list still uses the old query, and `ProductList

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content