Skip to content

Commit 1ca6523

Browse files
committed
added router instructions
1 parent f82dc3d commit 1ca6523

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ In your code, import the necessary symbols from `src/imports.js`.
6666

6767
Out of the box there are examples of both UMD and ESM libraries being used.
6868

69+
### Routing
70+
71+
To add routing, use the [UMD version of React Router](https://unpkg.com/browse/react-router/umd/) and [set up a HashRouter](https://www.pluralsight.com/guides/using-react-router-with-cdn-links).
72+
73+
See the [router branch](https://github.com/jsebrech/create-react-app-zero/tree/router) for an example that uses a static hash router.
74+
75+
If you don't want to use a hash router, [you may need to configure your production server to support client-side routing](https://create-react-app.dev/docs/deployment#serving-apps-with-client-side-routing) before deploying your app.
76+
6977
### Deployment
7078

7179
Upload the contents of the `public/` folder to a web host, or deploy it on github pages.
@@ -76,7 +84,6 @@ While a best effort has been made to bring you an authentic React web developmen
7684

7785
- **minification**: the dependencies are minified, and if your app code is so big to need minification, you probably need to use Create React App instead of this, but indeed there is no minification.
7886
- **bundling and tree shaking**: again, the dependencies are pre-shaken and pre-bundled, but the app code itself is not. Host on HTTP/2 to benefit from [multiplexing](https://developers.google.com/web/fundamentals/performance/http2/#request_and_response_multiplexing) and limit the performance impact of the lack of bundling.
79-
- **routing**: add the [UMD version of React Router](https://unpkg.com/browse/react-router/umd/) and [set up a HashRouter](https://www.pluralsight.com/guides/using-react-router-with-cdn-links).
8087
- **linting**: if you use *VS Code* with the *eslint* extension it should pick up the `.eslintrc.json` config and lint your project automatically.
8188
- **Internet Explorer**: it's time to let it go, seriously. But yes, no IE support, at all. Browser support in general should be pretty good though because all popular browsers are modern browsers.
8289

0 commit comments

Comments
 (0)