cssinjs / cssinjs/jss

Allow createUseStyles to access theme without useTheme explicitly

Open
#1,418 2 comments 5 reactions 0 assignees View on GitHub
feature request
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

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:
```

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.