Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Components not getting updates via context from JSS/ThemeProvider #464

@gusgid

Description

@gusgid

The following example shows how the theme is correctly toggled using React and React-dom. Switching to react-compat breaks it. Something todo with context being used by ThemeProvider?

https://stackblitz.com/edit/react-vxvdmr

What we found:

  • CSS selectors is changed in the header as expected
  • React Component do re-render as expected
  • The classes object sent via Context from ThemeProvider is not updated (rerender with the original classNames that does not have a definition anymore)

!!
Our example offline at least renders using preact-compat with the default theme, but at stackblitz it stops as soon we try to mount a component that is wrapped by injectSheet hoc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions