Processes
When to use?
When there is a lot of over-the-page logic that is difficult to control and expand for "end-to-end" interaction between pages
Use it only if you are sure that additional separation by processes will help your application, and will not cause too much misunderstanding and skepticism! โ ๏ธ
Description
The layer is optional, but it is usually located here:
- logic that affects several pages at once
- For example:
checkout
,auth
- For example:
- logic that would unnecessarily complicate the code of the pages and would be blurred in them
Processes should not contain display logic (ui), since the role of processes is to control the behavior of pages and underlying layers, but not to display anything independently
Structure
โโโ processes/{slice}
โโโ index.ts
โโโ lib.ts
โโโ model.ts
Examples
- User authorization
- Making an order
- Onboarding a new user of the service
Was this page helpful?
Your feedback helps us improve the docs