Error with JSS useContext
ahoenerBE opened this issue · comments
I'm using Preact with JSS, and I can't seem to inspect one of my components
VirtualizedItemTable contains JSS styles with the useStyles() hook
const useStyles = createUseStyles({
innerContainer: {
display: 'flex',
flex: '1 1 auto',
border: '1px solid',
paddingBottom: '1px'
},
table: {},
header: {
display: 'flex',
alignItems: 'center',
// paddingTop: '.5em',
},
});
When attempting to view the component, I get the following on firefox
and this on Chrome
Removing the JSS and just using imported CSS works fine
Same error with goober
. I made a demo: https://codesandbox.io/s/goober-preact-devtools-tr71r
Works fine if you remove useTheme
from setup
.
Thank you @ahoenerBE for the report and @AlPacone for the repro case. Just pushed a new version into the review queue and it should be up shortly. The fist was already in main
but I missed creating a new version earlier, sorry for the inconvenience!