WebStorm not suggesting/autocompleting code for styled-components

Viewed 1224

I've recently switched from VSCode to WebStorm. But I noticed that WebStorm doesn't suggest attributes and props on styled-components like VSCode. It does suggest for normal HTML/JSX though. Has anyone else had problems with it and know how to fix it?

I've installed types for react, react-native, react-dom, styled-system, and styled-components as this has been suggested before, but with no luck.

VSCode: An example from VSCode

Exact same code from the exact same project in WebStorm: Exact same code from the exact same project in WebStorm

VSCode even suggests props from Styled System, which WebStorm seems incapable of. I really like WebStorm, but this issue is making me wonder if I should switch back.

2020 MacBook Pro if that's relevant.

2 Answers

Just Install The @types/styled-components package. Its not getting type information Thats whats happening.

Related