Skip to content

Commit

Permalink
Route-based Code Splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmanueldaza committed Dec 26, 2024
1 parent 67ab581 commit 138b7bd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -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 <Slideshow />;
const App = () => {
return (
<Suspense fallback={<div>Loading...</div>}>
<Slideshow />
</Suspense>
);
};

export default App;

0 comments on commit 138b7bd

Please sign in to comment.