Kaizen Today I Learned by Ville Säävuori

Posts tagged typescript

Typing Firebase Database Queries With TypeScript

Document databases like Firebase work great with JavaScript but they can get really messy really fast if you’re not very strict with your data models. TypeScript is the perfect companion here and luckily the Firebase database functions can be easily typed in a way that will help you to keep your data consistent.

· Read the full article →

Weeknotes 2022/22 - Re-learning Firebase

I first learned about Firebase bretty soon after it was initially launched. I first tested it myself for a small personal app few years ago but then migrated away from it mostly due to issues with the developer tooling and also because of the large payload for even a minimal client.

· Read the full article →

Narrowing unknown type in TypeScript

Type narrowing is one of the most useful and powerful features of TypeScript. Sometimes, however, it can be a bit too complicated. Consider this simple function that uses Firebase: export const useSignOut = async () => { try { const auth = getAuth() await signOut(auth) } catch (err: any) { alert(err.

· Read the full article →

My Recommended JS/TS Packages - Alleviate Choice Paralysis

One of the challenges of the JS ecosystem is the outrageous number of available packages. This is a continuously maintained list of useful and preferred JavaScript/TypeScript packages that I have personally worked with. A recommended package on this list has to have: Good documentation Healthy maintenance status Modern codebase (ie.

· Read the full article →