Browse Source

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>`
main
Abrahym Sharf Eldden 3 years ago
committed by GitHub
parent
commit
55b4754073
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/code-splitting.md

2
content/docs/code-splitting.md

@ -178,7 +178,7 @@ Here's an example of how to setup route-based code splitting into your app using
```js
import React, { Suspense, lazy } from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
const Home = lazy(() => import('./routes/Home'));
const About = lazy(() => import('./routes/About'));

Loading…
Cancel
Save