Sign in

Bao Huynh

@bhuynh.dev
65 followers 136 following 150 posts

Backend Engineer Web-deving with React, Svelte, and a bunch of other stuff bhuynh.dev

PostsRepliesMedia
Bao Huynh @bhuynh.dev · 11/03/2025
My top fav dish
Meme image of a humanoid shrimp making fried rice, with text "you're telling me a shrimp fries this rice"
000
Bao Huynh @bhuynh.dev · 21/02/2025
TIL: `onpointerup` to make mobile-only click event. On mobile w/ limited horizontal space, I want to implement tapping on the row to show extra info. But on desktop with lots of whitespace, I prefer dedicated buttons. → Solution: Mobile-only clicking with `onpointerup` and `event.pointerType`
100
Bao Huynh @bhuynh.dev · 13/02/2025
TIL: ESM Dynamic import has a cache! So if you're developing a module to be dynamically imported, and seeing that it keeps importing the old version, you can bust the cache by just adding a query string with `Date.now()`
000
Bao Huynh @bhuynh.dev · 21/12/2024
My Git wrap for this year Honestly better than I thought but definitely has room for improvements. Nice to be able to put actions into metrics, so I can come to 2025 stronger I don't know where the 25 stars come from haha git-wrapped.com/profiles/bhu...
000
Bao Huynh @bhuynh.dev · 20/12/2024
Svelte 5 runes tip: exporting reactive values across files = WRAP it in a function Get/set accessor, class method, or just plain function This's because runes/signals are just plain-old JS that work by calling functions to access latest values This truly blows my mind coming from React and hooks
000
Bao Huynh @bhuynh.dev · 17/12/2024
More random mini Git tips to make your day easier: To test a merge without actually merging first - to see if you will have any merge conflicts ⭐ `git merge <branch> --no-commit ---no-ff` ⭐ If you then don't like the conflicts, you can `git merge --abort` it
000
Bao Huynh @bhuynh.dev · 10/12/2024
A mini Git tip to make your life easier If you're using `git commit -m` then suddenly realize this commit message is gonna be a lot longer than expected → Use the `--edit` flag to open up a Message Edit window to further add to your commit
010
Bao Huynh @bhuynh.dev · 07/12/2024
Spent hours today debug why Mandarin wouldn't display on WezTerm but VsCode works. Turns out MacOS default *implicitly* fallback on "PingFang SC". Not obvious at all. I fixed it w/ Noto Sans CJK SC 🧑‍🍳💋 And the story's hero is WezTerm's incredible CLI, with the exact command for debugging fonts 🙏
000
Bao Huynh @bhuynh.dev · 06/12/2024
New vim/neovim knowledge You can tell vim to "unmask" invisible characters such as tab or space with the simple `:set list` command Tabs are now > space are - and non-breaking space are + Undo with `:set nolist`
000
Bao Huynh @bhuynh.dev · 03/12/2024
I feel silly only realizing this about Svelte today. Bonus discovery: expression interpolation is the only way to do this, whereas $derived can't
010
Bao Huynh @bhuynh.dev · 03/12/2024
My new noob discovery about @svelte.dev $derived: You might NOT need it! For simple expressions, put it straight into your markup. They're still reactive! $derived is nice to get a reactive **variable** for a complex expression and/or to be re-used many times. Other case, I prefer interpolation.
100
Bao Huynh @bhuynh.dev · 28/11/2024
Or further refine for more sophisticated schemas w/ drizzle-seed's included generators, or even your own implementation drizzle-seed has: - valuesFromArray - int - firstName/lastName/fullName - phoneNumber - country - jobTitle - companyName and more at orm.drizzle.team/docs/seed-fu...
010
Bao Huynh @bhuynh.dev · 28/11/2024
More reason to love @drizzle.team for me: 🆕 "drizzle-seed" just dropped last week 🌱 - Just pass in your schema - Intelligent default generators - Ability to further refine generation - Seed relationships too - Utility to reset whole table drizzle-seed now on Drizzle 0.36.4!
250