From 138b7bd18c55755d7d678c939c91f9b039b6bca4 Mon Sep 17 00:00:00 2001 From: Juan Manuel Daza Date: Wed, 25 Dec 2024 22:25:00 -0300 Subject: [PATCH] Route-based Code Splitting --- src/App.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index a1c64de..d653d50 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,12 @@ -import Slideshow from "./components/slideshow/Slideshow"; +import { lazy, Suspense } from "react"; +const Slideshow = lazy(() => import("./components/slideshow/Slideshow")); -const App: React.FC = () => { - return ; +const App = () => { + return ( + Loading...}> + + + ); }; export default App;