-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug?] Warning: [JSS] Could not find the referenced rule logoAndCopyright in aphrodite-jss. #25
Comments
Seems like I'm doing things correctly, because if I modify my component from using aphrodite-jss, import {StyleSheet, css} from 'aphrodite-jss'
import {Component} from 'react'
export default
class Foo extends Component {
render() {
return <div className={css(classes.footer)}>
<div className={css(classes.logoAndCopyright)} />
</div>
}
}
const classes = StyleSheet.create({
footer: {
// ...
'& $logoAndCopyright': {
// ...
},
},
logoAndCopyright: {},
}) to using plain JSS (from react-jss), then it works great: import {jss} from 'react-jss'
import {Component} from 'react'
export default
class Foo extends Component {
render() {
return <div className={classes.footer}>
<div className={classes.logoAndCopyright} />
</div>
}
}
const {classes} = jss.createStyleSheet({
footer: {
// ...
'& $logoAndCopyright': {
// ...
},
},
logoAndCopyright: {},
}).attach() So seems something isn't working in |
I think the problem is the order of evaluation. The rules are lazily attached, which means the rules are only attached once I don't know if we can fix this. You can just call |
Hmmm, that may be a strange caveat. It'd be nice to fix it. Well I've switched to react-jss because I was able to get that to work with SSR in the other thread, and to use aphrodite-jss I would have to solve the same problem again for aphrodite-jss. |
As I see - it's old issue - but maybe somebody gonna looking for solution as I - to resolve this I moved style Initialization inside of component body |
I've got some styles using jss-nested with
$classname
syntax:then when I use it,
I get an error like
Full output:
The text was updated successfully, but these errors were encountered: