Skip to content

Commit 657cd40

Browse files
authored
Update useCallback.md - rename ShoppingForm to ShippingForm (#5656)
1 parent 9f929d3 commit 657cd40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beta/src/content/reference/react/useCallback.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ button[type="button"] {
385385
386386
#### Always re-rendering a component {/*always-re-rendering-a-component*/}
387387
388-
In this example, the `ShoppingForm` implementation is also **artificially slowed down** so that you can see what happens when some React component you're rendering is genuinely slow. Try incrementing the counter and toggling the theme.
388+
In this example, the `ShippingForm` implementation is also **artificially slowed down** so that you can see what happens when some React component you're rendering is genuinely slow. Try incrementing the counter and toggling the theme.
389389
390-
Unlike in the previous example, toggling the theme is also slow now! This is because **there is no `useCallback` call in this version,** so `handleSubmit` is always a new function, and the slowed down `ShoppingForm` component can't skip re-rendering.
390+
Unlike in the previous example, toggling the theme is also slow now! This is because **there is no `useCallback` call in this version,** so `handleSubmit` is always a new function, and the slowed down `ShippingForm` component can't skip re-rendering.
391391
392392
<Sandpack>
393393

0 commit comments

Comments
 (0)