diff --git a/sections/faqs/migration-v6.mdx b/sections/faqs/migration-v6.mdx index d990eacc..8330f0d7 100644 --- a/sections/faqs/migration-v6.mdx +++ b/sections/faqs/migration-v6.mdx @@ -34,11 +34,21 @@ import { StyleSheetManager } from 'styled-components'; function MyApp() { return ( - + {/* other providers or your application's JSX */} ) } + +// This implements the default behavior from styled-components v5 +function shouldForwardProp(propName, target) { + if (typeof target === "string") { + // For HTML elements, forward the prop if it is a valid HTML attribute + return isPropValid(propName); + } + // For other elements, forward all props + return true; +} ``` ### Vendor prefixes are omitted by default