flâneur — a map of the web's best reading

Rules of React – React

react.dev · 559 words · saved by 1 readers

Just as different programming languages have their own ways of expressing concepts, React has its own idioms — or rules — for how to express patterns in a way that is easy to understand and yields high-quality applications. To learn more about expressing UIs with React, we recommend reading Thinking in React. This section describes the rules you need to follow to write idiomatic React code. Writing idiomatic React code can help you write well organized, safe, and composable applications. These properties make your app more resilient to changes and makes it easier to work with other developers, libraries, and tools. These rules are known as the Rules of React. They are rules – and not just guidelines – in the sense that if they are broken, your app likely has bugs. Your code also becomes unidiomatic and harder to understand and reason about. We strongly recommend using Strict Mode alongside React’s ESLint plugin to help your codebase follow the Rules of React. By following the Rules of

API Reference Copy page Copy Rules of React Just as different programming languages have their own ways of expressing concepts, React has its own idioms — or rules — for how to express patterns in a way that is easy to understand and yields high-quality applications. Components and Hooks must be pure React calls Components and Hooks Rules of Hooks Note To learn more about expressing UIs with React, we recommend reading Thinking in React . This section describes the rules you need to follow to write idiomatic React code. Writing idiomatic React code can help you write well organized, safe, and

Explore this link on the map →

related reading