Write the hook.
Ship the insight.
Thread is where React engineers untangle gnarly logic at 2am — and wake up to 47 upvotes on the answer.
useEffect cleanup not firing on WebSocket reconnect — memory leak in prod?
Your cleanup function needs to close the socket before reassigning — you're leaking connections on every `threadId` change.
Also worth adding a `readyState` guard — `WebSocket.OPEN` check before you send. Silent failures in prod are brutal.
I'd extract this into a `useWebSocket` primitive and compose it here. Keeps the thread logic clean. See my gist ↗
Hover a topic.
Watch the community surface.
The cleanup function you keep forgetting to write
Abort controllers in useEffect: the complete pattern
StrictMode double-invoke: feature or footgun?
Trending
Discussions
The cleanup function you keep forgetting to write
Every time you return a function from useEffect you're making a promise to the runtime. Here's the promise most devs break.
Migrated 80k LOC from Redux to Zustand — full postmortem
The migration took 3 sprints. The unexpected wins took us by surprise. The gotchas nearly cost us a deadline.
Generic component props that don't fight TypeScript
Polymorphic components in TypeScript have a reputation for being painful. They don't have to be.
Re-render profiling: what React DevTools hides from you
The Profiler tab shows you what re-rendered. It doesn't always show you why. Here's the full picture.
StrictMode double-invoke: feature or footgun?
React 18 StrictMode runs effects twice in development. Most devs treat this as noise. It's actually a signal.
The engineers
already inside.
OSS maintainers, staff engineers, and mid-level devs who actually reply. Mentorship matching opens weekly.
Maintains 3 React libraries. Will argue about state management until 4am.
Performance obsessive. Profiler tab is always open. Ships to prod daily.
Atomic state evangelist. Every piece of state should earn its place.
Monorepo whisperer. Built and migrated 4 Next.js apps from Pages to App Router.
If it can be typed, it will be typed. Generic constraints are a love language.
Profiler. Bundle analyzer. The one who files the issue before you even notice the bug.
tRPC advocate. Believes the best API is the one you never have to document.
Debugging useEffect since React 16. Getting better at it, slowly.
Senior engineers open to pairing this week: 12 mentors available. Match expires Sunday.
The cursor is
already blinking.
2,841 threads. 8,400 React engineers. Zero recruiters. Sign in with GitHub — one click, you're in.