October 25, 2018
Alvin Crespo
If you’re new to TypeScript and you’re using a library like react-emotion, you might be wondering how to type your styled components. Here’s what I do.
Let’s say you have the following styled component:
I don’t know, but VSCode is here to save the day:
But…what are all these type definitions? And, where do they come from?
Well, after some digging around in react-emotion, create-emotion-styled and react itself — I found these awesome imports:
Alright! That’s all I have for you folks today. Let me know if you have any questions or feedback — I’d love to hear it.
Also, did you know the team at Echobind is hiring?! That’s right, we’re looking for some awesome people to help us build some cool products. For more info, check us out here.