Rukewe Joseph
banner
ruckydev.bsky.social
Rukewe Joseph
@ruckydev.bsky.social
Full-stack Javascript Developer | Mentor | Building Solutions with AI
🛠️ Make decisions without hand-holding.
🔥 Learn through trial, error, and iteration.

Pick a project, no matter how small—a to-do app, a portfolio, or even a simple game. The point isn’t perfection—it’s progress.

The best way to learn code? Write code. 💻
January 8, 2025 at 7:23 AM
Generics make sure fetchData knows exactly what type of data it’s dealing with — no surprises at runtime!

💬 How are you using generics in your TypeScript projects?
December 20, 2024 at 11:16 AM
Server Components 🌐: Offload rendering, fetch data, improve performance.

The Sweet Spot 🎯: Balance client and server components to unleash the full potential of your React apps.

Embrace the duality, and happy coding! 🚀
December 9, 2024 at 5:28 PM
It's easy to use, just pass in the keys and the value type. Happy typing 😁!

#TypeScript #WebDevelopment
December 4, 2024 at 6:40 AM
💡 In your `useEffect` hook, you can check if the `beforeunload` event is triggered and display a confirmation dialog if necessary.

Follow @ruckydev.bsky.social for more React tips.

#reactjs
December 4, 2024 at 6:28 AM
4. After the delay, it updates the real count

The result? A super responsive UI that feels fast and smooth!

Have you tried useOptimistic hook yet? What cool uses can you think of for your projects?
December 4, 2024 at 6:27 AM
Check out the attached code snippet for a simple counter example. Here's what's happening:

1. We create an optimistic count that updates instantly
2. When you click "Increment", you see the count go up immediately
3. Behind the scenes, it simulates a delay (like a network request)
December 4, 2024 at 6:27 AM
How does it work?
1. You give it your current state
2. You provide a function to update that state
3. It returns an "optimistic" version of the state that you can use right away

Why "optimistic"?
Because it optimistically shows the result of an action before it's actually complete!
December 4, 2024 at 6:27 AM