Skip to content

Commit b9acd54

Browse files
committed
add a paragraph about shared assets
1 parent 8a810e7 commit b9acd54

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/content/docs/docs/guides/examples/handling-assets.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Assets are static resources that your application uses. In FSD, assets follow th
1212

1313
It's a common practice to implement a custom `assets` segment for all static files, but this pattern is generally discouraged, as it violates FSD principles of high cohesion and locality of changes.
1414

15-
If you are interested in more detailed explanation, you can check articles on [Desegmentation](/docs/guides/issues/desegmented/) and [Slices and segments](/docs/reference/slices-segments/).
15+
If you are interested in a more detailed explanation, you can check articles on [Desegmentation](/docs/guides/issues/desegmented/) and [Slices and segments](/docs/reference/slices-segments/).
1616

1717
</Aside>
1818

@@ -60,7 +60,7 @@ Here, `invoice-template.pdf` is tightly coupled with the business logic in `crea
6060

6161
## Shared Assets \{#shared-assets}
6262

63-
If a static asset is used multiple times, you can move it to `shared/ui`, so it is accessible to every other part of application.
63+
If a static asset is used multiple times, you can move it to `shared/ui`, so it is accessible to every other part of the application.
6464

6565
<FileTree>
6666
- shared/
@@ -71,6 +71,15 @@ If a static asset is used multiple times, you can move it to `shared/ui`, so it
7171
- ...
7272
</FileTree>
7373

74+
The same approach can be applied for static assets that are used by shared components:
75+
76+
<FileTree>
77+
- shared/
78+
- ui/
79+
- Dropdown.tsx
80+
- chevron.svg
81+
</FileTree>
82+
7483
## Global Assets \{#global-assets}
7584

7685
Global assets include things like global stylesheets (such as a CSS reset) and fonts. The `app` layer is the right place for these files since they're only used by the application entrypoint.

0 commit comments

Comments
 (0)