emakina-cee-oss / react-cli

An easy to use CLI for starting and building React projects in a fast and consistent way.
MIT License
5 stars 0 forks source link

Change Template for Connected Components #20

Closed dgoerdes closed 6 years ago

dgoerdes commented 6 years ago

As we now distinguish between components and containers, the question was if a component should be only a stateless standalone component and how it is handled when it is connected to a state (Cerebral).

In terms of reusability, it should be a stateless component.
Also Styleguidist is configured to pick up all components by default. If a component is connected to Cerebral it will break the rendering within the style guide.

@flobacher recently came up with a good idea to change the template for connected components to export the stateless component and a connected version.