cssinjs / cssinjs/jss

dynamic css issue under a certain condition since version 10.9.1-alpha.1

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

Description

__Expected behavior:__
work same as 10.9.1-alpha.0

__Describe the bug:__

when my component get re-rendered several times and it depends on another component which use dynamic function.
then the dynamic css class of the dependent component is missing.
From what I observer:
there are several prerequisites to trigger the issue.
1. make some operations to cause components re-render
2. having a nested element inside a dynamic css function.

__Reproduction:__

https://codesandbox.io/s/stupefied-minsky-lw7wxs

__Versions (please complete the following information):__
- jss: 10.9.2
- Browser [e.g. chrome, safari]: chrome
- OS [e.g. Windows, macOS]: macOS
encountered the issue since 10.9.1-alpha.1

__Managing expectations:__

Maintainers will not be fixing the problem you have unless they have it too, if you want it to get fixed:

1. Submit a PR with a failing test
2. Discuss a solution
3. Implement it

You can also do the first step only and wait for someone else to work on a fix. Anything is much better than nothing.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the linked CodeSandbox with JSS 10.9.2, using the reported rerenders, component dependency, and nested element inside a dynamic CSS function. Done means the dependent component retains its dynamic CSS class under those conditions and a failing regression test is added.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.