Closed
Description
I assumed create-react-app
uses react-css-modules, but this code does not work (no styles applied):
import React from 'react'
import styles from './styles.css'
const TextField = ({children}) => (
<div className={styles.inputContainer}>
<span className={styles.inputLabel}>{children}</span>
<input className={styles.inputField}/>
</div>
)
export default TextField
It does, however, work when classes are defined as strings rather than scoped to this component. I think it wouldn't hurt to have this available for projects using create-react-app, what do you think?
Metadata
Metadata
Assignees
Labels
No labels