diff --git a/src/components/Tabs/Tabs.tsx b/src/components/Tabs/Tabs.tsx index 53debdbc7..442f55b91 100644 --- a/src/components/Tabs/Tabs.tsx +++ b/src/components/Tabs/Tabs.tsx @@ -241,7 +241,7 @@ export const Tabs = ({ * Get the previous value of a prop. Useful for comparing the previous to the current value. */ function usePrevious(prop: T) { - const ref = useRef(); + const ref = useRef(prop); useEffect(() => { ref.current = prop; });