MoroccanOSS / react-stoon

react-stoon is a handy toolbox of reusable Components that allow you to reduce boilerplate by writing less js inside of your React Components.
MIT License
29 stars 10 forks source link

create new Component using stoon.of(Component) #10

Open Amine-H opened 6 years ago

Amine-H commented 6 years ago

allow creating new component using this syntax:

const MyComponent = Show.of(Text);

and applying it as follows:

<MyComponent showIf={true}>Hey</MyComponent>
Amine-H commented 6 years ago

This will be closed because the approach above was rejected by the community,

Related Issues: https://github.com/MoroccanOSS/react-stoon/issues/11

Amine-H commented 6 years ago

I'll reopen this issue since some Component Kits depend on the hierarchy of the components and adding react-stoon Components would give undesirable results.

allowing the user to decorate their components with stoons without affecting that would be the goal.