seif.dev
HomeAboutBlogLearnHire Me
3 Dev Tips
react
Seif Sgayer
Seif Sgayer
10 months ago

React useEffect Cleanup

useEffect(() => {
  const subscription = api.subscribe();
  return () => {
    // Always cleanup subscriptions!
    subscription.unsubscribe();
  };
}, []);
typescript
Seif Sgayer
Seif Sgayer
10 months ago

TypeScript Type Guards

function isString(value: unknown): value is string {
  return typeof value === 'string';
}

// Usage
if (isString(value)) {
  // value is typed as string here
  console.log(value.toUpperCase());
}
nodejs
Seif Sgayer
Seif Sgayer
10 months ago

Node.js Stream Pipeline

import { pipeline } from 'stream/promises';

await pipeline(
  readableStream,
  transformStream,
  writableStream
);

// No need to handle cleanup manually!

Get Weekly Dev Tips in Your Inbox

Join 50,000+ developers receiving weekly tips and tricks to level up their skills.

seif.dev

Code💻Lift💪Solve Problems🧩Sleep😴Repeat🔄

Available Worldwide🌍✨

Quick Links

AboutBlogHire Me

More

FAQ
Available for Projects

Ready to Start?

I might have the solution to your problems.

GitHubLinkedInX (Twitter)DiscordThreadsInstagramFacebookReddit
Made with
by Seif Sgayer © 2025
Protected by reCAPTCHA (Privacy & Terms)

Seif Sgayer - Full Stack Developer

Expert Full Stack Developer specializing in React, Node.js, and modern web technologies. Available for freelance projects and consulting worldwide.

Contact: [email protected] | Available for projects worldwide

Follow me on GitHub, LinkedIn, Twitter, Discord, Threads, Instagram, Facebook, and Reddit