A
A
ayapergenov2016-07-25 08:15:09
css
ayapergenov, 2016-07-25 08:15:09

How to properly include css library in React + Redux project?

I want to use the css style library in a React + Redux project .
Installed css Library in node_modules via

npm i materializecss-theme
.
There is an app.js file, routes.js
Where and how to correctly connect the library loaded in node_modules?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Владислав Поляков, 2016-07-25
@ayapergenov

В свой index html

./node_modules/materializecss-theme/materialize.min.css

И не нужно подключать ее как лишнюю библиотеку Node . Подключайте самым обычным способом через css файл.
Хотите использовать Sass compass watch node_modules/materialize-theme Используйте Ruby, sass and compass are required.

T
theWaR_13, 2016-07-25
@theWaR_13

But I do not agree with the answer Vladislav Polyakov . The .html file should only include the generated .js file. Everything else must be connected either to a specific component or inside app.js (if it is some kind of global library that applies to the entire project).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question