

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234567# React + TypeScript Coding Standards89This rule builds on the core TypeScript standards and provides additional guidance for React development.1011## Hooks1213- Group hooks logically. Separate each `useState`, `useEffect`, `useMemo`, `useCallback`, etc., with a blank line.14- Avoid mixing multiple concerns inside a single hook.15- Always clean up effects that use subscriptions, timers, or external resources:16```tsx17 useEffect(() => {18 const interval = setInterval(() => {19 // logic20 }, 1000);2122 return () => clearInterval(interval);23 }, []);24```2526## Controlled Components2728- Always use controlled inputs where possible.29- Bind input `value` and `onChange` explicitly:30```tsx31 const [email, setEmail] = useState("");3233 return <input value={email} onChange={(e) => setEmail(e.target.value)} />;34```3536## Prop Drilling & Component Design3738- Avoid excessive prop drilling — prefer composition or context where appropriate.39- Use wrapper components and shared state management (like Redux Toolkit) when scaling.4041## Component Structure4243- Keep components small and focused on a single responsibility.44- Use internal render helpers when returning multiple JSX sections:45```tsx46 const renderUserInfo = () => {47 return <div>{user.name}</div>;48 };4950 return <div>{renderUserInfo()}</div>;51```5253## Naming Conventions5455- Component names should be PascalCase.56- File and folder names should match the component name.5758## Props5960- Always define prop types using an interface named `iComponentNameProps`.61- Default prop values should be handled via destructuring or `defaultProps` (if using class components).62- Optional props should be marked with `?`.6364## Type Safety6566- Strongly type event handlers and state:67```tsx68 const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {69 e.preventDefault();70 };71```7273## Readability7475- Avoid ternary expressions inside JSX if it makes the code unreadable — extract logic to a variable.76- Break complex JSX trees into smaller, reusable components.7778## State Naming7980- Use descriptive state names that reflect their purpose.81```tsx82 const [isModalVisible, setIsModalVisible] = useState(false);83```8485## Example8687```tsx88interface iLoginFormProps {89 onSubmit: (email: string, password: string) => void;90}9192const LoginForm: FC<iLoginFormProps> = ({ onSubmit }) => {93 const [email, setEmail] = useState("");94 const [password, setPassword] = useState("");9596 const handleFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {97 e.preventDefault();98 onSubmit(email, password);99 };100101 return (102 <form onSubmit={handleFormSubmit}>103 <input104 value={email}105 onChange={(e) => setEmail(e.target.value)}106 placeholder="Email"107 />108 <input109 value={password}110 onChange={(e) => setPassword(e.target.value)}111 type="password"112 placeholder="Password"113 />114 <button type="submit">Login</button>115 </form>116 );117};118```119
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| PluteoJS/next-js-typescript-starter.cursor/rules/project-structure.mdc · 3 | Cursor rules | stylearch | 33/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/project-ui-style-guide.mdc · 3 | Cursor rules | lint-formatstylearchui+1 | 77/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/react-component.mdc · 3 | Cursor rules | stylearchtypesui+1 | 66/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/shadcn-usage.mdc · 3 | Cursor rules | uido-not | 40/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starter.cursor/rules/typescript-coding.mdc · 3 | Cursor rules | styletypesdocs | 58/100 | 14 days ago | |
| PluteoJS/next-js-typescript-starterCLAUDE.md · 3 | CLAUDE.md | lint-formatarchtypesdo-not | 88/100 | 14 days ago | |
| PluteoJS/next-js-typescript-startersrc/components/CLAUDE.md · 3 | CLAUDE.md | archdo-not | 47/100 | 14 days ago | |
| PluteoJS/next-js-typescript-startersrc/services/CLAUDE.md · 3 | CLAUDE.md | setuparchtypessecurity+1 | 54/100 | 14 days ago | |
| PluteoJS/next-js-typescript-startersrc/store/CLAUDE.md · 3 | CLAUDE.md | stylearch | 58/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/pluteojs-next-js-typescript-starter-cursor-rules-react-typescript)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.