Media queries are not updated dynamically
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
__Expected behavior:__
Using function rules I want to be able to create media queries which depend on props and get updated on props change.
__Describe the bug:__
Media queries dont get updated on props change.
__Reproduction:__
https://codesandbox.io/s/react-jss-playground-forked-ekg58?file=/index.js
Clicking the Toggle Button changes the breakpoint for the media query. console.log shows, that the string gets generated, but the change is not reflected in the html output. Try changing the width of the output html view. Before clicking the toggle button, breakpoint width is 720px, where bakcground color changes red/blue. After clicking toggle button, it should be 480px.
__Versions ():__
- react-jss: 10.5.1
- Browser: was able to reproduce in current Chrome and Firefox browsers
- OS: Ubuntu
Contributor guide
Assessment
This issue has not been assessed yet.