Closed
Description
It would be nice to have a special syntax for child functions.
i.e.
<ThemeContext.Consumer>
<(theme)>
<h1 style={{color: theme === 'light' ? '#000' : '#fff'}}>
{this.props.children}
</h1>
</>
</ThemeContext.Consumer>
instead of
<ThemeContext.Consumer>
{theme => (
<h1 style={{color: theme === 'light' ? '#000' : '#fff'}}>
{this.props.children}
</h1>
)}
</ThemeContext.Consumer>