I am new to Web Development and currently learning React.js. I learned about how to create Components in React and giving styles to them.
Is it like that if I create separate CSS files for React Components, the app will load faster because the browser has to load small sized CSS files instead of single big file?
I want to ask about how React loads the CSS files in the browser and whether I should use separate CSS files for React Components.
CSSfiles will be the bundlers responsibility, notReact's. Having separateCSSfiles could actually be beneficial if your bundler doescode splittingbecause you may not want to load all yourCSSat once but rather in smaller chunks as needed. Using separateCSSfiles with something likeCSS Modulesis the best approach here since you're creating components and want things to be encapsulated rather than affecting things elsewhere/globally.