Skip to content

Commit

Permalink
Fix with start transition
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-sherman committed Oct 24, 2022
1 parent 7b57072 commit 24388fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function App() {
<h1>Hello World</h1>
<p>Count: {count}</p>
<p>
<button onClick={() => setCount(count + 1)}>Click me</button>
<button onClick={() => React.startTransition(() => setCount(count + 1))}>Click me</button>
</p>
<React.Suspense fallback={<SuspendedFallback />}>
<SuspendedThing />
Expand Down

0 comments on commit 24388fc

Please sign in to comment.