For example:
<div className="place__list--more"> Somewhere, I do not remember exactly, I read that the use of hyphens can lead to errors.
Somewhere, I do not remember exactly, ...">
For example:
<div className="place__list--more"> Somewhere, I do not remember exactly, I read that the use of hyphens can lead to errors.
That is possible.
If you use CSS-modules , then you just have to wrap it in brackets:
import s from './my_styles.scss'; render() { return ( <div className={s['place__list-more']}> </div> ); } If you use the classic approach, then no problems will arise if the class name is a valid string:
import './my_styles.scss'; render() { return ( <div className={'place__list-more'}> </div> ); } s['my-class'] , which seems to refer to s as an object. As I usually do className={"my-class"} . According to the link that you did not understand, there are no examples with a similar syntax - Alexandr TovmachSource: https://ru.stackoverflow.com/questions/940903/
All Articles