diff --git a/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx b/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx index 76e6d9cf23abc..d876da7803bbd 100644 --- a/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx +++ b/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx @@ -100,13 +100,15 @@ export const RealTourContextProvider = ({ children }: { children: ReactChild }) setCompleteStep(tourId); }, []); - const context = { - activeStep, - endTourStep, - incrementStep, - isTourShown, - setStep, - }; + const context = useMemo(() => { + return { + activeStep, + endTourStep, + incrementStep, + isTourShown, + setStep, + }; + }, [activeStep, endTourStep, incrementStep, isTourShown, setStep]); return {children}; };