skip to Main Content

React Suspense does not load stylesheet – CSS

I have the following code. <Suspense fallback={<span />}> {theme === "dark" ? <DarkTheme /> : <LightTheme />} </Suspense> DarkTheme.jsx import React from "react"; import "./dark-theme.css"; const DarkTheme = () => { console.log("Dark theme loading..."); return <></>; }; export default DarkTheme;…

VIEW QUESTION
Back To Top
Search