-
Notifications
You must be signed in to change notification settings - Fork 55
CMF Container Components guidelines
Before contributing to the stack you should read that first.
-
All components here must be pure and don't have any state.
-
A snapshot tests should never have more than 20 lines of HTML. (prefer shallow rendering instead of mount or react-renderer)
-
Expose renderers props to let the user customize sub components Note: this is a new rule, at the moment only the ActionBar implement it https://github.com/Talend/ui/pull/414
A container is a component which extended an existing pure component (often in react-talend-components).
-
The API (props) should by default support the same API as the pure component. The container should only add new props. If you fill the need to change the shape of the props ensure the original shape is still supported.
-
The container should support the same customization as the pure one exposing the sub components;
-
The container should inject extended sub components using the renderer props.
-
Most of the time use cmfConnect instead of connect to have cmf behavior.