The style written by react+redux to a component is only introduced separately in this component, so why do other components share the styles in this style file?

clipboard.png
only main is introduced in homepage


1. You have to understand the principle of css compilation, which compiles scss into css, and then introduces it into index.html through style tags, so it will definitely take effect globally
2. If you only want to take effect on this page, add some selector restrictions in the scss file or use css modules

Menu