React Jsx And Promise Lint Pitfalls

Use when React code is written, reviewed or linted for the mistakes a rule can catch mechanically: a button without a type inside a form, children passed as a prop, fragments that wrap nothing, a controlled checkbox with no change handler or with both checked and defaultChecked, components defined inside components (state lost on every render, render props, memoized copies), the value and setter naming of useState, and promises that nobody handles (floating statements, async functions passed to void-returning handlers and JSX attributes, async callbacks in forEach and map).

techmefr Updated

File contents

techmefr/mentis commit f9082879dd

Frequently asked questions

npx get-skill add techmefr/react-jsx-and-promise-lint-pitfalls