Sai Hari (@TheSSHGuy) header
Sai Hari (@TheSSHGuy) profile picture

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

Out of Office
Joined August 2022
Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)Photo by Sai Hari (@TheSSHGuy)
It’s so surreal how fast you can build personalized software for just about anything now.
1
21
Driving @t3dotcodes via Grok Bot and mcp is such a nice experience. Shared context I can jump right into and it can keep monitoring / driving things while I’m away.
21
Been using @t3dotcodes for a few weeks now and it’s pretty insane how good the dev experience is from my phone.
30
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/
1
3
10
1,313
Sai Hari retweeted
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
2
1
8
1,652
💡 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
96
💪 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
59
💡 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
1
1
1
97
⚡️ 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
1
1
211
💪 Remember the React JSX Rule — close all JSX elements. Unlike HTML, in JSX you need to explicitly close your tags. For most elements like a div, the syntax is the same. For self-closing tags, the syntax is a bit different. For example: use <img /> instead of just <img>
29
💡 React Rendering Tip It's important to assign unique keys to each item in a list of JSX elements. That said, these keys only need to be unique among sibling elements. Having duplicate keys in separate JSX trees is perfectly acceptable. #reactjs #typescript #webdevelopment
34
React doesn't render most falsy values. But, the number 0 is an exception. Why is that? There are good reasons for wanting to render 0. For example, you might want to show a countdown. To account for this, React renders all numbers. In the example, React renders the 0:
30
💪 Remember the React JSX Rule — always return 1 root element. Why? → JavaScript functions can only return 1 value. → JSX is just a fancy way of writing the React.createElement function. → If you try to return 2 elements, you're basically trying to call createElement twice.
31
💡 React Rendering Tip Always assign unique keys when mapping data to JSX. This helps React identify elements and update the DOM accurately. Poorly chosen keys can cause subtle bugs that lead to incorrect updates. #reactjs #javascript #typescript #webdevelopment
1
1
75
⚡️ React Rendering Tip React doesn't render most falsy values. But, what is a falsy value? A falsy value is just a value that would be considered false when converted to a boolean. You can use this to your advantage by conditionally rendering JSX using logical operators:
24
Creating dynamic lists in React is simple. All you need are standard JavaScript array methods. Take a list of data and map each item into JSX elements: #reactjs #javascript #typescript #webdevelopment
3
43
So how does React turns JSX into HTML? It doesn't, at least not directly. Here's what happens: 1. Build tools convert JSX into function calls. 2. These functions return objects that describe the HTML. 3. React uses standard DOM APIs to convert the objects into HTML.
15
💡 Flat Code Tip - How to Write Readable Code Use guard clauses to rule out error paths early #softwaredevelopment #programming #coding
1
2
50