Skip to content

Commit

Permalink
elimination of Suspense
Browse files Browse the repository at this point in the history
  • Loading branch information
danretegan committed Feb 20, 2024
1 parent 4d2e04d commit eca0c4c
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Suspense, lazy } from 'react';
import React, { lazy } from 'react';
import { Route, Routes } from 'react-router-dom';

import Home from '../pages/Home';
Expand All @@ -19,22 +19,8 @@ const App = () => {
<Route index element={<Home />} />
<Route path="movies" element={<Movies />} />
<Route path="movies/:movieId" element={<MovieDetails />}>
<Route
path="cast"
element={
<Suspense fallback={<div>Loading...</div>}>
<Cast />
</Suspense>
}
/>
<Route
path="reviews"
element={
<Suspense fallback={<div>Loading...</div>}>
<Reviews />
</Suspense>
}
/>
<Route path="cast" element={<Cast />} />
<Route path="reviews" element={<Reviews />} />
</Route>
<Route path="*" element={<NotFoundPage />} />
</Route>
Expand Down

0 comments on commit eca0c4c

Please sign in to comment.