Sai Hari

362 posts

Sai Hari banner
Sai Hari

Sai Hari

@TheSSHGuy

Building, teaching, and learning through code. Level 4 Vim Sommelier | I think, therefore I program https://t.co/6CZWuZDYrA Building: https://t.co/bCA1B4xmoT

Out of Office Katılım Ağustos 2022
86 Takip Edilen29 Takipçiler
Kai
Kai@kai_h·
@thorstenball I had one user who had _all_ of their email folders as subfolders in their Trash. I don't know how he started down this hellish path, but after an upgrade the email client decided to delete all items in the Trash older than 30 days. Fun times. Somehow it was my fault?
English
7
5
411
12.6K
Thorsten Ball
Thorsten Ball@thorstenball·
Few weeks ago, while adding buffer restoration to Zed, I came across this comment. I've been thinking about it every day and every day the same thought pops into my head. Why... why don't you save the file?
Thorsten Ball tweet media
English
103
44
1.9K
204.3K
Sai Hari
Sai Hari@TheSSHGuy·
@mattpocockuk Yo this is cool. Didn’t know you could make a type that accepts any string but also a list of defined strings for autocomplete support. There’s a few times this would have been really helpful!
English
0
0
1
104
Matt Pocock
Matt Pocock@mattpocockuk·
"it's unreadable" "a maintenance nightmare" "please don't do this" Your complex types don't need to be complex to use. Let me show you 🧵
Matt Pocock tweet media
English
46
132
2K
324.7K
Sai Hari
Sai Hari@TheSSHGuy·
@thecoockoo @DavidKPiano Having 1 variable represent multiple states is a great idea and makes things more manageable. I do this sometimes when I need to conditionally render things as well. For example, if I have multiple modals on a page, their state is represented by 1 variable with different types.
English
0
0
1
120
Oleksandr Bondarchuk
Oleksandr Bondarchuk@thecoockoo·
@DavidKPiano I'd say merging 3 states into one and using async/await makes useEffect version more compelling
Oleksandr Bondarchuk tweet media
English
5
1
56
2.7K
David K 🎹
David K 🎹@DavidKPiano·
Okay, listen. If you're going to fetch in useEffect(...), you should at least make sure that you're handling: - Loading states - Error handling (rejections & HTTP error codes) - Race conditions & cancellation This isn't over-engineering. It's the minimum code to prevent bugs.
David K 🎹 tweet media
English
75
160
1.5K
140.6K
Sai Hari
Sai Hari@TheSSHGuy·
@wesbos This is really cool. Will make it easier to run basic scripts without having to install something else!
English
0
0
1
498
Wes Bos
Wes Bos@wesbos·
Yessssss! Node just shipped the ability to run TypeScript files directly!
English
88
424
3.3K
217.8K
Sai Hari
Sai Hari@TheSSHGuy·
@levelsio @pubity That’s awesome! Just saw Luggage Losers get hunted by someone else on Product Hunt too, so definitely can see it get picked up.
English
0
0
0
14
@levelsio
@levelsio@levelsio·
A massive Instagram account called @pubity with 38 million followers featured luggagelosers.com today 😊 Until now it was kinda stuck going viral only in India (I think cause of Air India losing so much luggage) only, but now slowly moving into the English-speaking world Will be interesting if hits American news next Thx @littleasaf for telling me and no I didnt ask anyone to feature it, it's all organic
@levelsio tweet media@levelsio tweet media@levelsio tweet media
English
126
41
1.4K
422.6K
Sai Hari
Sai Hari@TheSSHGuy·
@danestves @kentcdodds This is cool! I’ve messed with Clerk a little bit, but didn’t realize you could do this.
English
0
0
0
3
Daniel Esteves — oss/acc
Daniel Esteves — oss/acc@danestves·
@kentcdodds We do that :) we use Clerk for Auth but everything that happens on the app is handled with our database, we just use them to know if the user is logged
English
2
0
7
2.1K
Kent C. Dodds 🏹
Kent C. Dodds 🏹@kentcdodds·
Do not drop your users table or offload user data to a third party. Just don't do it. You can use a third party for auth if you want, but for goodness sake, own your user data.
English
30
37
873
95.4K
Sai Hari
Sai Hari@TheSSHGuy·
@flyosity @kentcdodds Yeah this is my impression as well. Something going wrong in your database vs other parts of your app can be a bit more stressful I imagine, so handing off the responsibility can be enticing.
English
0
0
0
10
Mike Rundle
Mike Rundle@flyosity·
@kentcdodds I think it's a symptom of newer developers actually not understanding databases at all so the idea of actually storing their own data is scary But for everybody else, NOT storing our own user data is the scary part
English
1
0
1
1.1K
Sai Hari retweetledi
CodeSandbox
CodeSandbox@codesandbox·
Today’s community spotlight goes to… Kempo: a tool to build your code playgrounds using Sandpack 🌟 Kudos to @TheSSHGuy for making it even easier to display live-running code examples, especially in content platforms like Hashnode. Try it out ➡️ kempo.io
GIF
English
1
3
10
1.3K
Theo - t3.gg
Theo - t3.gg@theo·
I swear 90% of the ternary operators I see would have been more readable as an early return
English
63
13
815
81K
Sai Hari
Sai Hari@TheSSHGuy·
@codesandbox's Sandpack package is 🔥. It's a great way to introduce customized code playgrounds in your blog or documentation. If you're interested, I wrote about how it works and how to use it here: blog.thesshguy.com/sandpack
English
0
0
1
9
Sai Hari retweetledi
zaf
zaf@whizzaf·
happy holidays! ✨ congrats to all 282 contributors & special thanks to 👑 @rishi_raj_jain_ @n3o773 @rjacksonm1 @TheSSHGuy @ayewo_ @kafLamed @just_moh_it shoutout to the awesome tech we use everyday 💻 @vercel @supabase @DrizzleORM @shadcn @trpcio @t3dotgg @triggerdotdev
Ioannis Rafail Florokapis@iflorokapis

Happy Holidays!🎄Today @algoraio crossed $100,000 rewarded to #opensource contributors! Thank you guys 💪 @jdegoes @JNYBGR @peer_rich @maverickdotdev @tusharmath @generall931 @martindonadieu @robo_skills @ElTimuro @MicheleRivaCode @aidenybai @theJayKhatri @eaytin @JosephJacks_

English
0
2
8
1.6K
Sai Hari
Sai Hari@TheSSHGuy·
💡 React Rendering Tip When mapping data to JSX, put your key on the top-level element. React won't search through the child components for the key, which means nested keys won't impact the rendering logic. #reactjs #javascript #typescript #webdevelopment
Sai Hari tweet media
English
0
0
0
94
Sai Hari
Sai Hari@TheSSHGuy·
💪 Remember the React JSX Rule — most attributes use camelCase Variable names can't have dashes or be reserved keywords, so to make destructuring easier, JSX attributes are renamed → font-weight turns into fontWeight → class changes into className → tabindex becomes tabIndex
English
0
0
0
58
Sai Hari
Sai Hari@TheSSHGuy·
💡 React Rendering Tip Make sure you use stable keys by default for your React components. Using keys that change every time a component re-renders is inefficient. It forces React to destroy and recreate the component instead of updating it. #reactjs #webdevelopment
Sai Hari tweet media
English
1
1
1
97
Sai Hari
Sai Hari@TheSSHGuy·
⚡️ React Rendering Tip If you want to conditionally render JSX, an if/else statement may not always be effective. You can't nest them in curly brackets because they can't be used as values. Instead, you can solve this by using a ternary operator: #reactjs #webdev
Sai Hari tweet media
English
0
1
1
211