ImAmanThakur Profile Banner
Aman Profile
Aman

@ImAmanThakur

Followers
197
Following
2K
Media
123
Statuses
864

πŸ‘¨β€πŸ’» Fullstack Dev ❀️ Sharing content about React & NextJS 🀝 Let's Build Amazing Stuff!

Chandigarh, India
Joined May 2015
Don't wanna be here? Send us removal request.
@ImAmanThakur
Aman
2 years
Why handle errors in React? It helps avoid the white screen of death and lets users recover from errors. Let's look at two main ways to do it.
1
0
0
@ImAmanThakur
Aman
2 years
Handling errors in your React projects is vital for a great user experience. Explore try-catch and React Error . #React.
0
0
0
@grok
Grok
3 hours
Generate videos in just a few seconds. Try Grok Imagine, free for a limited time.
4
6
37
@ImAmanThakur
Aman
2 years
I recommend using react-error-boundary npm package. It not just displays the Error Boundary but also allows you to recover.
Tweet media one
1
0
0
@ImAmanThakur
Aman
2 years
🌟 Method #2: React Error Boundary. Introduced in React 16, error boundaries catch errors in child components and display a fallback UI. One can be used throughout your app!.
1
0
0
@ImAmanThakur
Aman
2 years
Why?. It spells out each step, unlike declarative code. You need to check for errors for each component that might throw an error.
1
0
0
@ImAmanThakur
Aman
2 years
πŸ›  Method 1: Using try-catch. Straightforward to implement but it's imperative and needs explicit checks for each component. But it is recommended for top-level use.
Tweet media one
1
0
0
@ImAmanThakur
Aman
2 years
Need to call a child method from a parent in #React? . Use the 'key' prop! Increase the key in the parent to trigger a method in the child with useEffect. Check out the screenshot for the code example. A handy way to refresh child components! πŸŽ‰
Tweet media one
0
0
0
@ImAmanThakur
Aman
2 years
🚨 Why you should avoid using the 'disabled' attribute in web development? Opt for 'aria-disabled' instead!. Using 'disabled' can cause navigation issues for keyboard users. 'aria-disabled' offers better accessibility and helps screen readers understand the control state.
0
0
0
@ImAmanThakur
Aman
2 years
πŸ› οΈ Found a really cool trick to check if a function is slowing down your React component! . Use console.time('label') to start a timer and console.timeEnd('label') to stop it.
Tweet media one
0
0
1
@ImAmanThakur
Aman
2 years
6️⃣ Caching: React 18’s cache function remembers results, reusing values without re-execution. πŸ—ƒοΈ.#React18 #AppPerformance #WebDevelopment.
0
0
0
@ImAmanThakur
Aman
2 years
4️⃣ Suspense: More power for data fetching! Render fallback components while data is being fetched. 🎒.
Tweet card summary image
react.dev
The library for web and native user interfaces
1
0
0
@ImAmanThakur
Aman
2 years
3️⃣ Server components: React now sends serialized components instead of HTML. More performance in reconstructing the component tree. Note: limitations on hooks and window. πŸ–₯️.
1
0
0
@ImAmanThakur
Aman
2 years
2️⃣ Transitions: Mark updates as non-urgent with startTransition. The total blocking time sees a significant improvement. πŸš€.
1
0
0
@ImAmanThakur
Aman
2 years
1️⃣ Concurrent React: Pause, resume, or even abandon rendering to avoid UI blocks during rendering. Meaning, React can pause rendering of component to handle important UI interaction like click. ⏸️▢️.
1
0
0
@ImAmanThakur
Aman
2 years
πŸŽ‰ React 18 is a game-changer for app performance. Let's explore how:.(Thread).
1
0
0
@ImAmanThakur
Aman
4 years
Start with a Figma file. Get the basic prototype of your app ready. Don't fill any colors. Just use grays. Don't worry about adding icons. In short, make important layout decisions in the design stage. Leave the minute details for later on.
0
0
0
@ImAmanThakur
Aman
4 years
Now don't take it otherwise and start designing every feature. If you're a designer, you can do it. But for developers, I wouldn't recommend doing so.
1
0
0
@ImAmanThakur
Aman
4 years
But why start with a design first?. I don't know about you but when I start a new app, I hate staring at the blank screen. Not just that, by starting with a design you know the end state of your product and it motivates you to keep going.
1
0
0
@ImAmanThakur
Aman
4 years
I am building an app that lets you log your activities and helps you keep track of your time. Here's how to start designing your app. #buildinginpublic.
1
0
0
@ImAmanThakur
Aman
4 years
RT @OG_IndieMaker: πŸŽ‰ I'm going to give one random person that retweets this $5. Because I’d rather spend my ad budget on you than BigTech….
0
2
0