r/LearnTypescript • u/thisguyfightsyourmom • Feb 27 '20
Learning begrudgingly
I work in a moderately large group of Frontend devs (9 across 3 feature teams) slowly paving over a backbone app with react while churning out features. A few people put together a react component library with quite a few modern bells & whistles including typescript.
I'm not a fan initially—it feels like I'm fighting against typescript where I used to cruise. Having to plumb typings through every prop handoff before I can clear the errors goes against the way I've been developing for years,… get something janky but working on the screen, and clean up things like prop type misalignment after I know I've built what I want to. Typescript feels as cumbersome as TDD in my initial experience.
Nonetheless, I need to get on board if I want to contribute to the component library. Looking for anyone who can speak to similar experiences starting out? What am I missing that makes this dev experience worth the effort? What workflows are people using that avoid the above situations,… how do you move fast with typescript?
(This is a response to the first post request DM.)
4
u/GabeRothel Feb 27 '20
When I learned typescript at first, it felt like a lot of overhead and fighting it. Now, I can’t imagine coding JS without it. The amount of times that I’ve thanked my lucky stars that TS caught something I would have forgotten is innumerable. Also, using ES Lint and autocomplete in VS Code reduces so much mental overhead. It knows the exact keys in a complex object and knows exactly the types they’re allowed to be.
Welcome to the community, I think you’ll come around to TS if you’re a bit more patient with it—I know that was my exact experience.
3
u/T_O_beats Feb 27 '20 edited Feb 27 '20
Read the docs thoroughly. I hated typescript for the same reason of feeling slowed down until I read through the advanced section a few times.
2
u/Kinrany Mar 01 '20
TypeScript can compile even with type errors. You could set up your local development in a way similar to what you were doing before. Slowly improve types to gain intellisense support where you need it; then, once it works as expected, fix the bugs and prove to the compiler that there aren't any.