smithery/erichowens

reactive-dashboard-performance

Expert in building blazing-fast reactive dashboards with comprehensive testing. Masters React performance patterns, testing strategies for async components, and real-world patterns from Linear, Vercel, Notion.

Installation

$ npx skills add smithery/erichowens --skill reactive-dashboard-performance

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/erichowens · top by installs.

npx skills add smithery/erichowens

Browse all from smithery/erichowens

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
More metadata
category
Frontend Development
tags
[]
0
react
1
performance
2
testing
3
dashboard
4
optimization
pairs-with
[]
5
skill: react-performance-optimizer
reason
Dashboard charts and graphs require performant data visualization rendering
6
skill: admin-dashboard
7
skill: data-viz-2025

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,821 B
  • docs SUMMARY.md 247 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Reactive Dashboard Performance

Expert in building production-grade reactive dashboards that load in <100ms and have comprehensive test coverage.

Core Expertise

Performance Patterns (Linear, Vercel, Notion-grade)

  1. Skeleton-First Loading

- Render skeleton immediately (0ms perceived load) - Stream in data progressively - Never show spinners for <200ms loads

  1. Aggressive Caching

- React Query with staleTime: 5min, cacheTime: 30min - Optimistic updates for mutations - Prefetch on hover/mount

  1. Code Splitting

- Route-based splitting (Next.js automatic) - Component-level lazy() for heavy widgets - Preload critical paths

  1. Memoization Strategy

- useMemo for expensive computations - React.memo for pure components - useCallback for stable references

Testing Reactive Dashboards

  1. Mock Strategy

- Mock at service boundary (React Query, analytics) - Never mock UI components (test real DOM) - Use MSW for API mocking when possible

  1. Async Handling

```typescript // WRONG - races with React render(<Dashboard />); const element = screen.getByText('Welcome');

// RIGHT - waits for async resolution render(<Dashboard />); const element = await screen.findByText('Welcome'); ```

  1. Timeout Debugging

- Timeouts mean: missing mock, wrong query, or component not rendering - Use screen.debug() to see actual DOM - Check console for unmocked errors

  1. Test Wrapper Pattern

``typescript const TestProviders = ({ children }) => ( <QueryClientProvider client={testQueryClient}> <AuthProvider> {children} </AuthProvider> </QueryClientProvider> ); ``

Real-World Examples

  • Linear Dashboard: Skeleton → Stale data → Fresh data (perceived &lt;50ms)
  • Vercel Dashboard: Prefetch on nav hover, optimistic deploys
  • Notion Pages: Infinite cache, local-first, sync in background

Diagnostic Protocol

Integration Test Timeouts

  1. Check what's actually rendering

``typescript render(<Component />); screen.debug(); // See actual DOM ``

  1. Find unmocked dependencies

- Check console for "not a function" errors - Look for network requests in test output - Verify all contexts are provided

  1. Fix async queries

- Use findBy instead of getBy - Increase timeout if needed: waitFor(() => {...}, { timeout: 3000 }) - Mock React Query properly

  1. Simplify component tree

- Test widgets individually first - Add full integration tests last - Use data-testid for complex queries

Performance Optimization

Dashboard Load Budget

Phase Target
Skeleton render 0-16ms (1 frame)
First data paint &lt;100ms
Full interactive &lt;200ms
Lazy widgets &lt;500ms

React Query Config

const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      staleTime: 5 * 60 * 1000, // 5min
      cacheTime: 30 * 60 * 1000, // 30min
      refetchOnWindowFocus: false,
      refetchOnMount: false,
      retry: 1,
    },
  },
});

Skeleton Pattern

function Dashboard() {
  const { data, isLoading } = useQuery('dashboard', fetchDashboard);

  // Show skeleton immediately, no loading check
  return (
    <div>
      {data ? <RealWidget data={data} /> : <SkeletonWidget />}
    </div>
  );
}

Common Pitfalls

  1. Spinners for fast loads - Use skeletons instead
  2. Unmemoized expensive computations - Wrap in useMemo
  3. Testing implementation details - Test user behavior
  4. Mocking too much - Mock at boundaries only
  5. Synchronous test expectations - Everything is async

When debugging test timeouts, ALWAYS start with screen.debug() to see what actually rendered.