cssinjs / theming

Unified CSSinJS theming solution for React
300 stars 39 forks source link

Allow users to have you call their component as a function instead of createElement #14

Closed kentcdodds closed 7 years ago

kentcdodds commented 7 years ago

This is what we do in glamorous.

This has the benefit of the component effectively serving as the render method of your ThemeComponent which has various benefits (one of which being performance).

We use this for all glamorous components via an option: withTheme(Comp, {createElement: false}) (createElement defaults to true).

kentcdodds commented 7 years ago

I wont need this when #3 lands :+1: