React tooling
Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/react-tooling
Debugging, build analysis, and ecosystem tools. Use when debugging React apps, analyzing bundles, or configuring Vite/webpack for React. (triggers: package.json, devtool, bundle, strict mode, profile)From its SKILL.md
npx -y skills add ComeOnOliver/skillshub --skill react-toolingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.8 KB, 412 tokens by cl100k_base, as published. Nobody here has run it
React Tooling
Priority: P2 (OPTIONAL)
Tools for analysis and debugging.
Implementation Guidelines
- Analysis: Use
source-map-explorerorwebpack-bundle-analyzer/rollup-plugin-visualizer(Vite) to inspect bundle size. Usereact-refreshfor hot reloading. - Linting: Mandate
eslint-plugin-react-hooks(exhaustive-deps) and Prettier for code consistency. - StrictMode: Enable
React.StrictModeto detect double-invoke lifecycle errors in development. - Profiling: Use the React DevTools Profiler (Flamegraph) to identify expensive components. Enable "Highlight Updates" to spot re-renders.
- Environment: Use Vite as a modern build tool (over CRA). Manage environment variables with
.env. - Debugging: Use
useDebugValuein custom hooks for better DevTools visibility. Useloggermiddleware in Redux oruseWhyDidYouUpdatefor props. - Build: Configure Uglify/Terser for production build minification. Use
vite-plugin-pwafor service worker generation.
Code
// Debugging Hooks
useDebugValue(isOnline ? 'Online' : 'Offline');
// why-did-you-render
if (process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React, {
trackAllPureComponents: true,
});
}
Anti-Patterns
- No Production Profiling: Remove
why-did-you-renderand debug tools before production builds. - No Skip StrictMode: Keep
<React.StrictMode>in dev to surface side effects early.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.