Answer the question
In order to leave comments, you need to log in
Is it possible to store styles in React LESS next to Components (JSX) and compile at the time of component loading?
The subject in a question actually.
Or, can someone suggest a different approach. The situation is such that the project is large and the styles are already 3-4 meters, and they grow further... Does anyone have any thoughts?
Answer the question
In order to leave comments, you need to log in
If, for example, webpack is used to build the project, then it is quite possible to do so. css-loader and less-loader are added, and after that you can write directly in the component
var style = require('./componentStyle.less');
// или если используется
import style from './componentStyle.less'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question