$ cat reviewing-vibe-code-node-react.md

Reviewing vibe code: a process for AI-generated Node.js and React

· #ai #code-review #nodejs #react

AI-generated code (“vibe code”) is now a normal part of shipping Node.js and React projects. The speed is real. So are the risks: bugs, security flaws, and non-idiomatic code that quietly drifts from your project’s standards.

The answer isn’t to stop using it. It’s a structured review process. (This started as a talk: slides here, and as a LinkedIn post.)

Where vibe code goes wrong

Node.js: improper async/await handling or callback hell; unvalidated inputs; vulnerable npm packages the model happily imports.

React: inefficient component rendering, missing key props, state management errors, outdated hooks usage.

Everywhere: context gaps. The model misses project-specific conventions (your Redux patterns, your Express middleware shape) because it can’t see them.

The five-step review

  1. Static analysis. ESLint with eslint-plugin-node for API routes and middleware; eslint-plugin-react and eslint-plugin-react-hooks for components. Catch the mechanical issues before a human spends attention.

  2. Functional review. Test API endpoints with Postman or Jest; verify component behavior, props, and state updates actually do what the prompt asked for.

  3. Security check. npm audit or Snyk over the dependency tree; check dynamic rendering and user inputs for XSS.

  4. Performance evaluation. Look for event-loop blocking and unoptimized database queries server-side; use React DevTools to catch unnecessary re-renders client-side.

  5. Code style. Prettier + ESLint enforcing one consistent style, so generated code is indistinguishable from house code.

A small case study

Vibe code generated a Node.js API route and a React login form. The review found an unhandled promise rejection in the async route handler and a missing key prop in a mapped list causing render issues. Fixes: try-catch with proper error middleware on the route; unique keys and input sanitization on the form. Secure, performant, maintainable, but only after review.

Practices that make it stick

The point

Vibe code boosts productivity, but it needs the same bar as human code: automated tools for what machines catch best, human oversight for what they can’t see. The teams that struggle with AI-generated code aren’t the ones using it most. They’re the ones reviewing it least.

← cd ../writing