#1418·jss

Allow createUseStyles to access theme without useTheme explicitly

Author: just-BriCreated Nov 3, 2020Updated Jan 18, 2024
Labelsfeature request

Related to: https://github.com/cssinjs/jss/issues/1401

I thought this was working as intended until I stumbled upon the issue linked above. I actually like being able to basically auto-subscribe to the theme within children, rather than having to call useTheme() and pass the theme explicitly.

As @kof mentioned this could be turned in to an option on the ThemeProvider:

<ThemeProvider theme={theme} useTheme={true}/>