From 657cd40016f1bf3a72f0124a6054145d80304c6a Mon Sep 17 00:00:00 2001 From: skyhawk14 <30406990+skyhawk14@users.noreply.github.com> Date: Sat, 18 Mar 2023 04:59:55 +0530 Subject: [PATCH] Update useCallback.md - rename ShoppingForm to ShippingForm (#5656) --- beta/src/content/reference/react/useCallback.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beta/src/content/reference/react/useCallback.md b/beta/src/content/reference/react/useCallback.md index cdce0224..8d94f01a 100644 --- a/beta/src/content/reference/react/useCallback.md +++ b/beta/src/content/reference/react/useCallback.md @@ -385,9 +385,9 @@ button[type="button"] { #### Always re-rendering a component {/*always-re-rendering-a-component*/} -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. +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. -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. +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.