ReactStream Logo
GitHub

Streamline Your React Development

ReactStream is a comprehensive CLI toolkit that analyzes your components and helps you debug effectively—all in one seamless workflow.

terminal
# Install globally
$ npm install -g @reactstream/cli

# Analyze your component
$ reactstream analyze MyComponent.js

✓ Syntax valid
✓ No linting issues

Imports Analysis:
• react: React, useState, useEffect

Hooks Usage:
• useState (line 5)
• useEffect (line 12)

# Test your component
$ reactstream serve MyComponent.js --port=3000

React Component Example

This example demonstrates a simple React functional component with hooks, state management, and conditional rendering - the kind of component ReactStream helps you analyze and debug.

MyComponent.js
import React, { useState } from 'react';

const MyComponent = () => {
  const [count, setCount] = useState(0);
  const [isVisible, setIsVisible] = useState(true);

  const handleIncrement = () => {
    setCount(prevCount => prevCount + 1);
  };

  const toggleVisibility = () => {
    setIsVisible(prev => !prev);
  };

  return (
    <div className="my-component">
      <h2>My Example Component</h2>

      {isVisible && (
        <div className="counter-section">
          <p>Count: {count}</p>
          <button onClick={handleIncrement}>
            Increment
          </button>
        </div>
      )}

      <button onClick={toggleVisibility}>
        {isVisible ? 'Hide' : 'Show'} Counter
      </button>
    </div>
  );
};

export default MyComponent;

Start in console

ReactStream Logo

and ... go to browser http://localhost:3000/

ReactStream Logo
ReactStream Logo