Top Tweets for #usecallback
🧵 React Hooks every React developer should know 👇
⚡ useState — Manage component state
🔄 useEffect — Handle side effects
🧠 useContext — Share data without prop drilling
🚀 useMemo — Memoize expensive calculations
⚙️ useCallback — Memoize function references
🔧 useRef — Store values without triggering re-renders
🎯 useReducer — Manage complex state logic
💡 useId — Generate unique IDs for accessibility
📦 useTransition — Keep UI responsive during updates
🔍 useDeferredValue — Defer expensive UI updates
Hooks aren’t just something to memorize.
Understand when and why to use them. That’s what makes you a better React developer. 💪
React developers: Which hook do you use the most?
#React #ReactJS #JavaScript #FrontendDevelopment
Stop asking AI to "make my React Native app faster."
You're getting generic `useCallback` band-aids that do nothing for your real performance bottlenecks.
Here are 3 real optimization fixes your AI agent won't suggest unless you force it:
1. Enable R8 Code Shrinking (Android)
AI loves adding npm packages. R8 strips dead code and optimizes resources during production builds, drastically reducing build size and startup times.
2. Enforce Virtualized Lists
If your prompt builds a product feed using `ScrollView` + `.map()`, your memory will explode. Force your AI to use `FlatList` or `FlashList` with explicit `keyExtractor` props.
3. Inject Architecture Rule Files
Create a `.cursor/rules/` file or Markdown guide in your repo. Force your AI to check list performance and dynamic import rules *before* it generates UI components.
Don't let AI ruin your app's memory footprint.
📅 Daily Progress
🔹 Revised Pointers for DSA
🔹 Studied useMemo, useCallback & React.memo
🔹 Discussed and planned a new project - will share more soon
Placement prep continues ⚡
#DSA #React #PlacementPrep #BuildInPublic
📅 Daily Progress
🔹 Practiced Reasoning questions
🔹 Studied Trees & Linked List structures in JavaScript
🔹 Joined the LeetCode Biweekly Contest very late - managed to solve 1 question 😅
Placement prep continues ⚡
#LeetCode #JavaScript #DSA #PlacementPrep
I genuinely want to know how does interview process looks in this AI era
Like still the questions they are types vs interface, useCallback vs useMemo or are there any different approach in hiring
how do i prepare for interview plzz someone help😩
📅Weekly Log
continued revising React this week:-
->useState & useEffect hook (in depth)
->React.memo, useCallback and how it relates to closures
->useMemo & useRef hook
->Built a small stopwatch which cleared many concepts around state management and references

useCallback was the hook that took me longest to actually internalize - not the syntax, but when it's worth using it at all vs when it's just adding indirection with no measurable benefit.
What was the late-clicker for you?
Most developers start optimizing by adding memo, useMemo, and useCallback.
Most of the time, they're optimizing the wrong thing.
Before touching any code, profile it.
I was reading about React Native profiling today and one point stood out:
Don't guess where the slowdown is.
Measure it.
React Native DevTools can show exactly which components are re-rendering, why they're re-rendering, and where React is spending the most time. The components highlighted in yellow are usually where the real work is happening.
As builders, we often spend hours "optimizing" code that wasn't the bottleneck in the first place.
Whether you're building a startup or a mobile app, decisions backed by data beat assumptions every time.
#reactnative #buildinpublic #startup #performance #connect
If you're building products on @X, let's connect 🤝

React Hooks: The Game Changer in Modern Frontend Development
-Simplifies state management with 'useState" no more complex class components.
- Handles side effects effortlessly using 'useEffect".
-Makes code cleaner, reusable, and easier to test.
•Encourages functional programming patterns for scalable apps.
Why Developers Love Hooks
* Reduces boilerplate code significantly.
* Improves readability and maintainability.
* Enables custom hooks for reusable logic across components.
* Works seamlessly with modern React features.
Pro Tips for Using Hooks Effectively
* Always follow the Rules of Hooks (no conditional calls).
* Keep hooks small and focused
* Use "useMemo" & "useCallback" for performance optimization.
* Avoid unnecessary re-renders with proper dependency arrays Mastering hooks is not optional anymore--it's essential for building powerful React apps.
Follow @vintagewordstuf for more

10 React Hooks Every Frontend Dev Must Know:
- useState 🔄 (Local state)
- useEffect 🌊 (Side effects)
- useContext 🌐 (Global state)
- useRef 📌 (DOM reference)
- useMemo 🧠 (Memoize values)
- useCallback ⚡ (Memoize functions)
- useReducer 🔧 (Complex state)
- useLayoutEffect 🖼️ (DOM measurements)
- useId 🆔 (Unique IDs)
- Custom Hook 🪝 (Reusable logic)
Which hook confuses you the most? 👇
Save this. 📌
#React #JavaScript #Frontend #WebDev #Tech
Days 6 & 7 of my journey
Continued grinding through React Hooks -useEffect, useCallback, custom hooks… it's slowly clicking.
Also kicked off LeetCode on day 6. First problem felt like reading a different language but we keep moving 💀
Now async/await is genuinely humbling me 😭 I get the concept but writing it clean is a whole other thing.
Did you guys have a resource or moment that finally made it click? Drop it below 👇
#ReactJS #LeetCode #JavaScript #100DaysOfCode #WebDev
Day 5 of React / Next.js
useCallback .... keeps function reference stable
prevents unnecessary re-renders
when passing functions to child components
useCallback(() => {}, [deps])
looks similar to useMemo…
but used for functions.
![Tushar_Jsx's tweet photo. Day 5 of React / Next.js
useCallback .... keeps function reference stable
prevents unnecessary re-renders
when passing functions to child components
useCallback(() => {}, [deps])
looks similar to useMemo…
but used for functions. https://t.co/bOucLp2GKf](https://pbs.twimg.com/media/HGUqxFUWwAAPcBP.jpg)
Interviewer:
You wrapped your component in React.memo(). You used useCallback for every function.
The profiler says it’s still re-rendering every time as the parent state changes.
Why is it happening?
#react
I am thinking of moving out of vibe coding for one of my projects.
AI writes the code, it works at first but it breaks a lot too. The database tables, the unnecessary util functions, and those annoying useCallbacks and useMemo for optimization. ughh.
Keeping up with those previous context's memory is another challenge which I believe will take some time.
The visual side is good because it is way faster than me manually writing tailwind.
Earlier things were easier ( not faster), at least I knew what I was doing, now the cost of maintaining the AI written code is high.
Maybe I am prompting wrong with claude code. Or maybe it is only me.
I am going to try a new project, no vibe coding, just me writing the code purely.
Here’s a clear, beginner-friendly explanation of the 6 important React Hooks shown in the image. Each one is explained simply, with what it does, when to use it, and a short easy example.
1. useRef – “A Drawer That Doesn’t Re-render”
What it does: Creates a box (reference) that can store a value and never causes your component to re-render when you change it.
Best for: Storing values that need to persist across renders (like timers, previous values, or direct access to DOM elements).
Simple Example:
const ref = useRef(null);
return <input ref={ref} />; // You can do ref.current.focus()
Key Point: Changing ref.current does not trigger a re-render.
2. useCallback – “Remember Functions”
What it does: Remembers a function so it doesn’t get recreated on every render.
Best for: Passing functions to child components (prevents unnecessary re-renders of children).
Simple Example:
const memoizedFn = useCallback(() => {
console.log("Hello");
}, []); // [] = dependencies
Key Point: Without useCallback, every render creates a brand-new function → children may re-render even when they don’t need to.
3. useState – “Storing & Changing Values”
What it does: Adds state (data that can change) to your component.
Best for: Anything that should make the UI update when it changes (count, form inputs, toggles, etc.).
Simple Example:
const [count, setCount] = useState(0);
return <button onClick={() => setCount(count + 1)}>{count}</button>;
Key Point: Updating state triggers a re-render of the component.
4. useContext – “Share Data Without Prop Drilling”
What it does: Lets you access data from a Context (global-like state) anywhere in your component tree.
Best for: Themes, user info, language settings — data needed by many components.
Simple Example:
const theme = useContext(ThemeContext);
return <div style={{ color: theme }}>Hello</div>;
Key Point: No need to pass props through many levels of components.
5. useEffect – “Syncing with Outside World”
What it does: Runs side effects (code that interacts with the outside world) after render.
Best for: Fetching data, setting up subscriptions, manipulating DOM, timers.
Simple Example:
useEffect(() => {
fetchData().then(setData);
return () => cleanup(); // optional cleanup
}, [dependencies]);
Key Point: The dependency array [] controls when the effect runs.
6. useMemo – “Cache Expensive Calculations”
What it does: Remembers (caches) the result of an expensive calculation so it doesn’t run again unless dependencies change.
Best for: Heavy computations, filtering/sorting large lists, complex object creation.
Simple Example:
const expensiveValue = useMemo(() => {
return computeHeavyThing(data);
}, [data]);
Key Point: Improves performance by avoiding unnecessary recalculations.
Quick Summary Table (Easy to Remember)
Hook
Purpose
Causes Re-render?
Use When...
useRef
Store persistent value
No
Need value without re-render
useCallback
Remember functions
No (for the fn)
Passing functions to children
useState
Manage changing data
Yes
UI needs to update
useContext
Share global data
Yes (if value changes)
Avoid prop drilling
useEffect
Side effects (API, timers, etc.)
No (runs after)
Interact with outside world
useMemo
Cache expensive results
No
Heavy calculations
These 6 hooks cover most of what you’ll need in modern React apps.
Would you like me to also create a simple code playground or mini project that combines all 6 hooks together? Just say the word!
![vintagewordstuf's tweet photo. Here’s a clear, beginner-friendly explanation of the 6 important React Hooks shown in the image. Each one is explained simply, with what it does, when to use it, and a short easy example.
1. useRef – “A Drawer That Doesn’t Re-render”
What it does: Creates a box (reference) that can store a value and never causes your component to re-render when you change it.
Best for: Storing values that need to persist across renders (like timers, previous values, or direct access to DOM elements).
Simple Example:
const ref = useRef(null);
return <input ref={ref} />; // You can do ref.current.focus()
Key Point: Changing ref.current does not trigger a re-render.
2. useCallback – “Remember Functions”
What it does: Remembers a function so it doesn’t get recreated on every render.
Best for: Passing functions to child components (prevents unnecessary re-renders of children).
Simple Example:
const memoizedFn = useCallback(() => {
console.log("Hello");
}, []); // [] = dependencies
Key Point: Without useCallback, every render creates a brand-new function → children may re-render even when they don’t need to.
3. useState – “Storing & Changing Values”
What it does: Adds state (data that can change) to your component.
Best for: Anything that should make the UI update when it changes (count, form inputs, toggles, etc.).
Simple Example:
const [count, setCount] = useState(0);
return <button onClick={() => setCount(count + 1)}>{count}</button>;
Key Point: Updating state triggers a re-render of the component.
4. useContext – “Share Data Without Prop Drilling”
What it does: Lets you access data from a Context (global-like state) anywhere in your component tree.
Best for: Themes, user info, language settings — data needed by many components.
Simple Example:
const theme = useContext(ThemeContext);
return <div style={{ color: theme }}>Hello</div>;
Key Point: No need to pass props through many levels of components.
5. useEffect – “Syncing with Outside World”
What it does: Runs side effects (code that interacts with the outside world) after render.
Best for: Fetching data, setting up subscriptions, manipulating DOM, timers.
Simple Example:
useEffect(() => {
fetchData().then(setData);
return () => cleanup(); // optional cleanup
}, [dependencies]);
Key Point: The dependency array [] controls when the effect runs.
6. useMemo – “Cache Expensive Calculations”
What it does: Remembers (caches) the result of an expensive calculation so it doesn’t run again unless dependencies change.
Best for: Heavy computations, filtering/sorting large lists, complex object creation.
Simple Example:
const expensiveValue = useMemo(() => {
return computeHeavyThing(data);
}, [data]);
Key Point: Improves performance by avoiding unnecessary recalculations.
Quick Summary Table (Easy to Remember)
Hook
Purpose
Causes Re-render?
Use When...
useRef
Store persistent value
No
Need value without re-render
useCallback
Remember functions
No (for the fn)
Passing functions to children
useState
Manage changing data
Yes
UI needs to update
useContext
Share global data
Yes (if value changes)
Avoid prop drilling
useEffect
Side effects (API, timers, etc.)
No (runs after)
Interact with outside world
useMemo
Cache expensive results
No
Heavy calculations
These 6 hooks cover most of what you’ll need in modern React apps.
Would you like me to also create a simple code playground or mini project that combines all 6 hooks together? Just say the word!](https://pbs.twimg.com/media/HFsVN_IaAAASwNw.jpg)
React interview:
What is the difference between
useMemo and useCallback?
🚀 Day 26/100 — #React Performance finally clicked!
🧠 React.memo → skip re-renders
🧠 useMemo → cache values
🧠 useCallback → reuse functions
Simple rule:
Component. Value. Function.
Code works → good
Code fast → GREAT 🔥
#100DaysOfCode #ReactJS #LearnInPublic

@vish_dev09 First I find what’s causing rerenders using React DevTools then optimize with memo, useMemo, and useCallback.
Stop wrapping every React function in useCallback from day one! 🛑
You're literally spending performance to save performance. React has to do work to check those dependencies on every single render.
requests.
Fix: Server sets Access-Control-Allow-Origin header.
Development: Use proxy in create-react-app.
🧠 9️⃣ How do you optimize React performance?
✅ Answer:
React.memo, useCallback, useMemo, lazy loading, code splitting.
Virtualization for large lists (react-window).
🚀 ReactJS tip that’ll instantly speed up your app:
Tired of unnecessary re-renders?
✅ Wrap components in React.memo()
✅ Wrap functions in useCallback()
✅ Wrap heavy values in useMemo()
Your users (and your CPU) will love you 😎
Drop your favorite optimization trick below 👇
#ReactJS #WebDev #JavaScrip
Day44 Of #100DaysOfCode
🏌️Did questions on occurrence, reverse, repetition of number In Java.
🏌️Practiced - useEffect, useRef,useState,useCallback.
#ReactJS #Java #WebDev #DSA

@victor_gis Great tip, useCallback is a lifesaver for RN perf!
Fix this React Native issue in 2 minutes:
If your app keeps re-rendering unnecessarily 👇
Wrap your function with useCallback()
It prevents wasted renders and improves performance instantly.
Most devs ignore this.
Don’t.

@omlondhe2133 I adopted React Compiler on my work and I can see it’s the real deal. No more useMemo or useCallback. We escaped from a lot of “problems” by adopting it early.
Last Seen Hashtags on Sotwe
breedingkink
Seen from Brazil
backshots white girl
Seen from United States
恶堕
Seen from United States
รับงานเชียงราย
Seen from Thailand
pregnant pussy
Seen from South Africa
blonde #backshots
Seen from Pakistan
蜜桃臀
Seen from Japan
cfnm
Seen from United States
OETTrainingInstitute
Seen from United States
thirdpartyfundraisers
Seen from Italy
Trends for you
Most Popular Users

Elon Musk 
@elonmusk
239.3M followers

Barack Obama 
@barackobama
118.5M followers

Cristiano Ronaldo 
@cristiano
114.3M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Narendra Modi 
@narendramodi
106.9M followers

Rihanna 
@rihanna
98.6M followers

NASA 
@nasa
92M followers

Justin Bieber 
@justinbieber
91.7M followers

KATY PERRY 
@katyperry
89.9M followers

Taylor Swift 
@taylorswift13
83.9M followers

Lady Gaga 
@ladygaga
75.4M followers

Virat Kohli 
@imvkohli
73.2M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.6M followers

Neymar Jr 
@neymarjr
66.3M followers

Bill Gates 
@billgates
65.1M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.6M followers

X 
@x
60.6M followers

























