Bao Huynh (@bhuynhdev) header
Bao Huynh (@bhuynhdev) profile picture

Backend Engineer 1 @OnlineRewards. Expert chess sacrificer ♛♟️& master at ruining my own sleep schedule. Connect with me at https://nitter.gq/t.co/2Se3RvzYrB

Cincinnati
Joined August 2019
Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)Photo by Bao Huynh (@bhuynhdev)
I’m done with tailwind My code is absolutely cluttered with pointless strings that should always have been separated into its own concern Use the web platform, don’t get oversmart about your abstractions
49
3
7
298
33,716
You can now see which value is the active value in min(), max() and clamp() - in Canary DevTools today - coming to Chrome stable soon!
15
80
9
698
35,804
Small UX improvements like this make me so happy. Hope @firefox gets this too
1
236
I know there's the whole "eat the frog" mentality to work, but sometimes knocking out little nagging tasks can really boost mental focus and help get some energy back
1
7
366
I think it depends on your start state energy. If low then we start small by knocking out small tasks to create momentum. If high, then tackle the largest task first so your mind is at ease
1
1
20
My new noob @sveltejs discovery: You might NOT need $derived! For simple expressions, put it straight into your markup. They're still reactive! $derived is useful for reactive **variable** w/ a complex expression and/or to be re-used many times. But otherwise, I prefer simple
2
146
I feel silly only realizing this about Svelte today. Bonus discovery: expression interpolation is the only way to do this, whereas $derived can't
1
53
More reason to love @DrizzleORM 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!
1
67
drizzle-seed comes w/ some sane default generators based on your column type and names. Examples: - col type includes "date" → GenerateDate - string col with "name" in name → GenerateFirstName - "email" → GenerateEmail More at: github.com/drizzle-team/driz…
1
32
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-f…
32
With React Router 7 I can change one global config setting to enable ssr. 👍 What’s surprising: loader only fires when doing SSR or pre-rendering. So, it's ignored for a plain client-side rendered SPA. I used loader in previous client-rendered apps, so this change seems odd.
6
3
35
7,511
im just working on remix nowadays, and that's look similar to remix loader, isnt it?
1
1
14
That's correct. These Remix loaders are merging into React Router so that RR users can also enjoy SSR data loading benefits if want to. React Router 7 is now basically the new Remix.
1
38
Poll: Next.js decomposes a route via multiple files like page, error, loading, etc. React Router 7 decomposes a route via multiple functions in a single file (like loader, heading, and a default export for the component itself) Which approach do you prefer?
37%Next.js - separate files
63%RR7 - separate functions
398 votes • Final results
9
2
24
5,294
Separate functions are great when things are small and simple (great for demos), but real world apps that have been a round a while tend to grow much larger over time, and you tend to split things out into multiple files anyways.
2
3
180
IME with functions you have more flexibility. You decide if you want to split or not (and if you want to, it's not hard) as opposed to being forced to.
1
1
52
The "writable derived" is an incredible Svelte trick I just learned from @joyofcodedev 🚩 Problem: 2-way sync btw two states, but can't use "$derived" because it's 1-way readonly → ✅Use an object with get/set Here, typing activate checking, and unchecking also reset email
3
1
12
573
this tweet has such @housecor vibes i love it
1
2
112
I learned directly from him. Love his problem/solution tweets
2
37
Unsure if this's recommended or not - I can't find anything about this in Svelte doc (maybe I don't know the right keyword) - but it feels so elegant! This probably equals setting up some "$effect", but coming from React, I was taught that I should minimize effect usage
1
78
TIL: A <button> element inside a <label> element will not work, as the button captures the click for itself and doesn't pass it to the label at all. Greedy buttons.
62
i love a good sparkly water bev
2
6
569
Fresca is pretty good
25
Our awesome @UC_IEEE wants to tell you all about how great they are!
2
1
6
306
This is so cutee
1
27
Today I converted another person to the no-barrel-files team. Feels great.
57
TIL: the server is an incremental static site regenerator
60
penguin giving away his drug for free to get the public hooked on it so that he can later charge for it and make money now why does that sound familiar
6
1
13
1,894
I think I read on Reddit the other day about someone having thousands of users on the Free tier of their side project, so they quit job and start trying to monetize, then the number of users just drop 10 times
1
1
58