3
1 Comment

Why I switched to TypeScript

Hey indie hackers 👋

I would like to share my thoughts of my experience of switching over an entire component library powered by vanilla JS to TypeScript (talking about Flowbite) and what was my experience.

First of all, I've been a web developer for over 10 years and I have never ever wrote or even considered switching to TypeScript for one simple reason: I was lazy and wanted speed over safety.

This has been true for me a long while because I've only ever built small and medium sized projects and never felt the need to introduce types in my projects.

The library that I'm talking about is one of my first projects that started getting used on a large scale and introducing new features and building on top of existing code became scarier as the project got larger.

Based on this problem and also the demand from the community I decided to give TypeScript a chance - it was love and hate at the first sight.

Love because as I started to introduce types and update the existing code it felt like I was doing a spring cleaning and I've spotted countless of inconsistencies where objects sometimes had values that shouldn't have been there.

Hate because it does take more time to introduce new features and make sure that the code follows TypeScript best practices.

All in all, a few days ago I finally launched the TypeScript version of Flowbite and the community feedback has been great and at the end of the day, I would probably keep using TypeScript for projects that I believe to become adopted on a larger scale.

One thing that I loved is that I use VS Code it had really good integration tools for TypeScript including ESLint and native editor features - big, big plus!

How about you? Do you use TypeScript? Is it a love and hate relationship?

Share your thoughts!

PS: here you can find more details about the TS integration: https://flowbite.com/docs/getting-started/typescript/

  1. 2

    I'm just getting started with Typescript and front-end ecosystems as I was rather a senior backend developer in the past few years working on legacy code. With my love project and first SaaS, finally I can dive into this part of web development as well. I assume it won't be an easy ride, but the point is to enjoy the journey and learn as much as I can. Örülök, hogy más magyarokat is látok ezen a platformon! :) Üdv!

Trending on Indie Hackers
Passed $7k 💵 in a month with my boring directory of job boards 57 comments How I got 1,000+ sign-ups in less than a month with social media alone 22 comments 87.7% of entrepreneurs struggle with at least one mental health issue 14 comments Are you wondering how to gain subscribers to a founder's X account from scratch? 9 comments Story of Iconbuddy from $0 to $6k per month in last 9 months 6 comments My Startup Update: Month 1 5 comments