I am making an application with three Routers: localhost/login and localhost/admin, localhost Different styles.css set for each route When imported in different js files of different styles.css, they are superimposed on the same page. How do I restrict styles to a single route?
Did you mean some of the styling of the other components are applyinh on the other route's components?
Try using different classNames instead of using the same classNames which is a big problem I had with react since React is sort of utilizing only one HTML.
You might be interested in css modules to make them scoped and become only locally available instead of using them by priority when available just like what your current css does