You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: i18n/en/docusaurus-plugin-content-docs/current/get-started/overview.mdx
+8-3
Original file line number
Diff line number
Diff line change
@@ -65,16 +65,21 @@ Layers, slices, and segments form a hierarchy like this:
65
65
66
66
Layers are standardized across all FSD projects. You don't have to use all of the layers, but their names are important. There are currently seven of them (from top to bottom):
67
67
68
-
1.**App\*** — everything that makes the app run — routing, entrypoints, global styles, providers.
68
+
1.**App** — everything that makes the app run — routing, entrypoints, global styles, providers.
3.**Pages** — full pages or large parts of a page in nested routing.
71
71
4.**Widgets** — large self-contained chunks of functionality or UI, usually delivering an entire use case.
72
72
5.**Features** — _reused_ implementations of entire product features, i.e. actions that bring business value to the user.
73
73
6.**Entities** — business entities that the project works with, like `user` or `product`.
74
-
7.**Shared\*** — reusable functionality, especially when it's detached from the specifics of the project/business, though not necessarily.
74
+
7.**Shared** — reusable functionality, especially when it's detached from the specifics of the project/business, though not necessarily.
75
75
76
-
_\* — these layers, **App** and **Shared**, unlike the other layers, don't have slices, and are made up of segments directly._
76
+
:::warning
77
77
78
+
Layers **App** and **Shared**, unlike other layers, do not have slices and are divided into segments directly.
79
+
80
+
However, all other layers — **Entities**, **Features**, **Widgets**, and **Pages**, retain the structure in which you must first create slices, inside which you create the segments.
81
+
82
+
:::
78
83
The trick with layers is that modules on one layer can only know about and import from modules from the layers strictly below.
3.**Pages** (страницы) — полные страницы или большие части страницы при вложенном роутинге.
71
71
4.**Widgets** (виджеты) — большие самодостаточные куски функциональности или интерфейса, обычно реализующие целый пользовательский сценарий.
72
72
5.**Features** (фичи) — _повторно используемые_ реализации целых фич продукта, то есть действий, приносящих бизнес-ценность пользователю.
73
73
6.**Entities** (сущности) — бизнес-сущности, с которыми работает проект, например `user` или `product`.
74
-
7.**Shared\*** — переиспользуемый код, особенно когда он отделён от специфики проекта/бизнеса, хотя это не обязательно.
74
+
7.**Shared** — переиспользуемый код, особенно когда он отделён от специфики проекта/бизнеса, хотя это не обязательно.
75
75
76
-
_\* — эти слои, **App** и **Shared**, в отличие от других слоев, не имеют слайсов и состоят из сегментов напрямую._
76
+
:::warning Важно
77
+
78
+
Слои **App** и **Shared**, в отличие от других слоев, не имеют слайсов и состоят из сегментов напрямую.
79
+
80
+
Однако для всех остальных слоёв — **Entities**, **Features**, **Widgets** и **Pages**, сохраняется структура, в которой необходимо сначала создать слайс, внутри которого создавать сегменты.
81
+
82
+
:::
77
83
78
84
Фишка слоев в том, что модули на одном слое могут знать только о модулях со слоев строго ниже, и как следствие, импортировать только с них.
0 commit comments