1

The app has two sides, Blog and management.

I code the management part with ant design.

The blog part is with html template. (assets file folder in css, js, img exc.)

While rendering React, all css and js files print on the same page and confusion occurs. Css files are corrupted in design because they overlap. I use craco as the web configuration, you can find the configuration in the link below.

https://ant.design/docs/react/use-in-typescript

Is there a way to separate two templates with react router dom? For example, can different theme files work on each page?

CodAvo
  • 183
  • 1
  • 2
  • 16
  • It's a more involved problem, but you'd have to add/remove stylesheets on page change: [replacing css file on the fly (and apply the new style to the page)](https://stackoverflow.com/questions/19844545/replacing-css-file-on-the-fly-and-apply-the-new-style-to-the-page). This has very little to do with React (other than that you'd likely call the function in a useEffect after the route changes) – Zachary Haber May 31 '20 at 01:22

0 Answers0