From d7661fea5314edd2335246fc6dce4a9043c452cc Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Thu, 27 Apr 2023 18:57:53 +0200 Subject: [PATCH] remove JSON,stringify --- src/hooks/useLink.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/hooks/useLink.ts b/src/hooks/useLink.ts index 7efd554..c277e95 100644 --- a/src/hooks/useLink.ts +++ b/src/hooks/useLink.ts @@ -31,7 +31,16 @@ export const useLink = (options: LinkOptions) => { (node.current as Element).setAttribute(key, options[key]); }); } - }, [JSON.stringify(options)]); + }, [ + options.href, + options.media, + options.as, + options.rel, + options.crossorigin, + options.type, + options.hreflang, + options.sizes, + ]); useEffect(() => { hasMounted.current = true;