diff --git a/packages/react/src/styled.tsx b/packages/react/src/styled.tsx index 75dfc3ed..1a58c459 100644 --- a/packages/react/src/styled.tsx +++ b/packages/react/src/styled.tsx @@ -1957,9 +1957,13 @@ export function verboseStyled( componentConfig ); - const AsComp: any = React.useRef( - resolvedStyleProps.as || (passingProps.as as any) || undefined - ).current; + // const AsComp: any = React.useRef( + // resolvedStyleProps.as || (passingProps.as as any) || undefined + // ).current; + + const AsComp: any = React.useMemo(() => { + return resolvedStyleProps.as || (passingProps.as as any) || undefined; + }, [resolvedStyleProps.as]); let resolvedStyleMemo = [passingProps?.style, ...resolvedStyleProps?.style]; if (Platform.OS === 'web') {