We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
*string interpolation Error : react-pug/no-broken-template Code that got error: https://paste.ofcode.org/8SRSabwhEnQBwYeTNdEXDG Transpilier use: https://github.com/pugjs/babel-plugin-transform-react-pug Code that cause error: div(className=${portfolioSection.projects > 0 ? '.mb-4' : ''})
div(className=${portfolioSection.projects > 0 ? '.mb-4' : ''})
The text was updated successfully, but these errors were encountered:
@phmngocnghia thanks for reporting this. I was able to reproduce this behavior, will keep you updated.
Sorry, something went wrong.
@phmngocnghia in the meantime you can see the better options of using pug in react: https://github.com/pugjs/babel-plugin-transform-react-pug#define-local-variables-and-use-javascript-in-attributes
Basically your example could be re-written this way:
div(class=portfolioSection.projects > 0 && '.mb-4') div(class=portfolioSection.projects > 0 ? '.mb-4' : '')
@phmngocnghia I've published new release: 0.3.2. Please, take a look at it and feel free to re-open this issue if it's not fixed.
0.3.2
No branches or pull requests
*string interpolation
Error : react-pug/no-broken-template
Code that got error: https://paste.ofcode.org/8SRSabwhEnQBwYeTNdEXDG
Transpilier use: https://github.com/pugjs/babel-plugin-transform-react-pug
Code that cause error:
div(className=${portfolioSection.projects > 0 ? '.mb-4' : ''})
The text was updated successfully, but these errors were encountered: