Oscar
Oscar
The issue is coming from the `@types/styled-components` package, issue found [here](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/59765). You can bypass the type issues by locking `@types/react` to version `17.0.43` until the other repo gets updated.
As mentioned in https://github.com/styled-components/vscode-styled-components/issues/376#issuecomment-1262021658 it might help to clear your VS Code search & editor history when reinstalling the extension.
I had the same issue @mateuszral, just reinstalling didn't work. What _did_ work for me though, was: - Uninstalling extension & reload VS Code - `ctrl / cmd` + `shift`...
Try this in `wdyr.ts`: ```typescript /// import React from "react"; if (process.env.NODE_ENV === 'development') { const whyDidYouRender = require("@welldone-software/why-did-you-render"); whyDidYouRender(React, { trackAllPureComponents: true, logOnDifferentValues: true, collapseGroups: true, trackHooks: true, });...
Just like with `styled-components`, return the `css` template string function instead of a plain template literal. This'll not only fix syntax highlighting, but also CSS linters in case you're using...
@Twipped [this sandbox](https://codesandbox.io/s/goofy-dan-517igl?file=%2Fsrc%2FApp.tsx%3A0-23) demonstrates the difference in syntax highlighting. I've been using this approach for basically every project (albeit mostly with `styled-components` and only once with MUI) as otherwise linting...