react-web-feature

Implements React 19 web views with Zustand stores, MUI components, and typed fetch services.

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/DCueto/zen-track --skill react-web-feature-dcueto
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-web-feature
Source: https://github.com/DCueto/zen-track/tree/main/ZenTrackApp/.agents/skills/react-web-feature
Command: npx skills add https://github.com/DCueto/zen-track --skill react-web-feature-dcueto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building React views without clear architectural rules leads to re-render cascades from React Context, duplicated domain types that diverge from the backend, hardcoded colors that break dark mode, and untyped HTTP calls that fail at runtime. This Skill enforces a consistent architecture for the ZenTrack webApp/ frontend. ## Core Features & Use Cases - Zustand Selector Pattern: Prevents unnecessary re-renders by subscribing components to precise store slices with useShallow, replacing React Context for dynamic state. - OpenAPI-Generated Types: Keeps frontend domain models synchronized with the Ktor backend by regenerating src/types/api.ts with openapi-typescript instead of hand-writing interfaces. - Typed Fetch Services: Wraps native fetch in a typed apiFetch<T>() helper with JWT injection from useAuthStore and ApiError encapsulation, with Axios explicitly prohibited. - Use Case: When asked to create a new Kanban board screen, the Skill walks through regenerating API types, creating task.types.ts adapters, writing task.service.ts, defining useTaskStore with optimistic updates, and building BoardScreen plus reusable TaskColumn components. ## Quick Start Create a new React screen in webApp/ that displays tasks from the workspace endpoint using a Zustand store and MUI components.

Frequently Asked Questions about react-web-feature

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent unnecessary re-renders in React with Zustand?▼

Use precise selectors like useTaskStore(state => state.tasks) instead of subscribing to the whole store. For multiple fields from the same store, wrap the selector in useShallow from zustand/react/shallow to avoid creating new objects each render.

How to sync TypeScript types with a Ktor backend API?▼

Generate src/types/api.ts automatically from the server's OpenAPI spec using npx openapi-typescript http://localhost:8080/openapi.json. Never edit this file manually; re-export domain types through adapter files in src/types/ and regenerate when the backend model changes.

Zustand vs React Context for dynamic state management?▼

Zustand with selectors is preferred for dynamic state because React Context re-renders all consumers whenever any context value changes. Context should only hold static values like theme configuration or a fixed locale.

Can I use Axios for HTTP requests in a React app?▼

In this architecture Axios is prohibited due to known supply-chain vulnerabilities. Use native fetch wrapped in a typed apiFetch<T>() helper that injects the JWT from useAuthStore and throws an ApiError for non-OK responses.

Why does MUI dark mode break with hardcoded colors?▼

Hardcoded hex colors in the sx prop bypass the MUI theme system, so palette switching has no effect. Use theme tokens like 'primary.main' or 'text.secondary' and typography variants instead of literal font sizes.

How do I type custom MUI component props in TypeScript?▼

Extend the native MUI interface such as CardProps or ButtonProps instead of defining your own props with any. This preserves accessibility attributes, event handlers, sx, and ref typing while letting you add domain-specific props.