gajus / gajus/babel-plugin-react-css-modules
Cannot Resolve Stylename If not explicitly a String
Abierto
enhancement
- Lenguaje dominante
- JavaScript
- Estrellas
- 2k
- Forks
- 159
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Take the following code snippet:
```
render() {
const appliedStyles = ['one', 'two'];
appliedStyles.push(this.props.a ? 'style-a' : 'style-b');
return (
Hello
);
}
```
What you'll see is that we'll end up getting something like `Unhandled rejection Error: Could not resolve the styleName 'style-a'.`
However, if we change the code ever so slightly to
```
```
then it seems to work.
Is this a Babel constraint or a fixable bug? The pattern works with your [non-babel version](https://github.com/gajus/react-css-modules).
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.