You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tl;dr the dependency on styled components is bad for typescript users.
Hey primer components team,
I know this isn't an issue directly with this repository or with Primer Components, but it greatly affects the experience of getting started with Primer Components, and I wanted to share it with you.
I'm using react + typescript in a brand new project. I wanted to use primer components because they look cool and fit a style I'm looking for. OK, should be easy, just yarn add @primer/components...
That worked OK, but now when I try to use the components, I get a error:
Module not found: Can't resolve 'styled-components'
bit odd, but OK, I'll install styled-components yarn add styled-components
For me it was easier to just remove Primer Components and I'll use something else, but I assume that's not the experience you're looking for. I hope this was helpful :)
Hey primer components team,
I know this isn't an issue directly with this repository or with Primer Components, but it greatly affects the experience of getting started with Primer Components, and I wanted to share it with you.
I'm using react + typescript in a brand new project. I wanted to use primer components because they look cool and fit a style I'm looking for. OK, should be easy, just
yarn add @primer/components...That worked OK, but now when I try to use the components, I get a error:
bit odd, but OK, I'll install styled-components
yarn add styled-componentsand now a typescript compilation error:
Looking into it, I found these issues:
The maintainers at styled-components don't seem to care
Duplicate identifier 'FormData'. TS2300 styled-components/styled-components#2842
The maintainers at definitely types haven't been able to resolve the issue.
node_modules/@types/react-native/globals.d.ts (36,15): Duplicate identifier 'FormData'. DefinitelyTyped/DefinitelyTyped#33311
For me it was easier to just remove Primer Components and I'll use something else, but I assume that's not the experience you're looking for. I hope this was helpful :)