bulletproof-react icon indicating copy to clipboard operation
bulletproof-react copied to clipboard

The difference between components/Elements and components/*.

Open mamaredo opened this issue 3 years ago • 2 comments

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.

mamaredo avatar Mar 01 '22 05:03 mamaredo

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.

alan2207 avatar Mar 11 '22 19:03 alan2207

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?

mamaredo avatar Mar 23 '22 06:03 mamaredo