bulletproof-react
bulletproof-react copied to clipboard
The difference between components/Elements and components/*.
Hi, thanks for the nice architecture design! I would like to ask you a question regarding the title🤔
I would like to know the difference between a component placed in components/* and a component placed in components/Elements/*.
Specifically Head and Layout are global, so I understand that they are placed outside of Elements, but I feel uncomfortable that Form and Notifications are also placed there. I would like to know what criteria are used to place them there.
Hey,
In Elements we have components that would belong to a design system such as Buttons, Links, etc. Maybe Elements should be changed to something like ui, but that is a matter of preference.
Form contains the behavior of a form thus should not belong to Elements. It is shared but not as simple as the UI components.
Thank you for your reply.
I believe Form and Notifications are part of the design system.
Why don't UI components with behaviors belong to Elements?
Notifications has behaviors, but the processing is in the useNotificationStore, so I don't think that complex processing is written in Notifications itself.
Since Notifications also has behaviors, does that mean it is not included in Elements?