From 4501addc08f783ab30708605e8329133a3193a7b Mon Sep 17 00:00:00 2001 From: Erik <9088720+erikdstock@users.noreply.github.com> Date: Fri, 14 Feb 2025 11:04:57 -0600 Subject: [PATCH] update hook deps and docs (#15208) --- docs/unleash_a-b_testing.md | 3 ++- src/Components/ArtsyShippingEstimate.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/unleash_a-b_testing.md b/docs/unleash_a-b_testing.md index acae76e0563..1da6cc7e603 100644 --- a/docs/unleash_a-b_testing.md +++ b/docs/unleash_a-b_testing.md @@ -111,9 +111,10 @@ function MyComponent() { }) + // biome-ignore lint/correctness/useExhaustiveDependencies: Only track experiment viewed once useEffect(() => { trackFeatureVariant() - }) + }, []) return ( // Your Components diff --git a/src/Components/ArtsyShippingEstimate.tsx b/src/Components/ArtsyShippingEstimate.tsx index a3a427865f5..f2779d6336b 100644 --- a/src/Components/ArtsyShippingEstimate.tsx +++ b/src/Components/ArtsyShippingEstimate.tsx @@ -51,9 +51,10 @@ export const ArtsyShippingEstimate = (props: ArtsyShippingEstimateProps) => { variantName: variant?.name ?? "control", }) + // biome-ignore lint/correctness/useExhaustiveDependencies: Only track experiment viewed once useEffect(() => { trackFeatureVariant() - }) + }, []) if (variant?.name === "experiment") { return