F
F
frolldoll2018-04-18 16:59:05
css
frolldoll, 2018-04-18 16:59:05

Why do css styles disappear in react app?

I have a react app with the following hierarchy - 5ad74e4fb5266175035115.pngAll css is public and included in index.html . so in react components I use styles, and if I enter the application on localhost:3000 the styles work, why go to localhost:3000/page_2 the styles will work, but if I update the page here, they will disappear and will not work anywhere, until I go back to localhost:3000 and update the page there ???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslavv, 2018-04-20
@Yaroslavv

Include your css via import
import './css/style.css';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question