Translated this article#1030
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
| ## Устаревшие API {/*legacy-apis*/} | ||
|
|
||
| * [Legacy APIs](/reference/react/legacy) - Exported from the `react` package, but not recommended for use in newly written code. | ||
| - [Устаревшие API](/reference/react/legacy) — экспортируются из пакета `react`, но не рекомендуются к использованию. |
There was a problem hiding this comment.
но не рекомендуются к использованию _в новых проектах_.
| ## Правила React {/*rules-of-react*/} | ||
|
|
||
| React has idioms — or rules — for how to express patterns in a way that is easy to understand and yields high-quality applications: | ||
| React предъявляет определённые требования к структуре компонентов, чтобы код был понятным и приложения — надёжными: |
There was a problem hiding this comment.
Можно как-то так:
React использует стандартизированные подходы (или правила), которые помогают эффективно и понятно реализовывать архитектурные шаблоны и обеспечивать высокое качество приложений:
| * [Components and Hooks must be pure](/reference/rules/components-and-hooks-must-be-pure) – Purity makes your code easier to understand, debug, and allows React to automatically optimize your components and hooks correctly. | ||
| * [React calls Components and Hooks](/reference/rules/react-calls-components-and-hooks) – React is responsible for rendering components and hooks when necessary to optimize the user experience. | ||
| * [Rules of Hooks](/reference/rules/rules-of-hooks) – Hooks are defined using JavaScript functions, but they represent a special type of reusable UI logic with restrictions on where they can be called. | ||
| - [Компоненты и хуки должны быть чистыми](/reference/rules/components-and-hooks-must-be-pure) — чистота кода делает его более понятным и предсказуемым и облегчает оптимизацию со стороны React. |
There was a problem hiding this comment.
Чистота обеспечивает более простое понимание и отладку кода, позволяя React правильно проводить автоматическую оптимизацию компонентов и хуков
| ## React DOM {/*react-dom*/} | ||
|
|
||
| React-dom contains features that are only supported for web applications (which run in the browser DOM environment). This section is broken into the following: | ||
| Пакет `react-dom` предоставляет функциональность, специфичную для веб-среды (браузера). Раздел включает: |
| * [Client APIs](/reference/react-dom/client) - The `react-dom/client` APIs let you render React components on the client (in the browser). | ||
| * [Server APIs](/reference/react-dom/server) - The `react-dom/server` APIs let you render React components to HTML on the server. | ||
| - [Хуки](/reference/react-dom/hooks) — хуки, работающие в DOM-среде. | ||
| - [Компоненты](/reference/react-dom/components) — поддержка всех стандартных HTML- и SVG-элементов как компонентов React. |
There was a problem hiding this comment.
React поддерживает все встроенные HTML- и SVG-компоненты, доступные в браузере.
|
Небольшое замечание по названию Merge Request: "Translated this article" — слишком общее и не отражает сути изменений. Когда таких MR становится много, сложно с первого взгляда понять, о чём речь. Лучше использовать более конкретное название, например: Translate “React Reference Overview” Если есть возможность — переименуй MR, чтобы его было проще найти и понять. Спасибо! |
Полный перевод этой статьи.