Skip to content

Commit 55b4754

Browse files
Updated code-splitting.md (#4303)
Updated the imported `react-router-dom` Component `BrowserRouter` to read as `BrowserRouter as Router` since the code example has it as `Router` instead of `BrowserRouter` Alternatively, can change the `<Router></Router>` component to be `<BrowserRouter>...</BrowserRouter>`
1 parent ea824c6 commit 55b4754

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/code-splitting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Here's an example of how to setup route-based code splitting into your app using
178178

179179
```js
180180
import React, { Suspense, lazy } from 'react';
181-
import { BrowserRouter, Routes, Route } from 'react-router-dom';
181+
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
182182

183183
const Home = lazy(() => import('./routes/Home'));
184184
const About = lazy(() => import('./routes/About'));

0 commit comments

Comments
 (0)