atlassian-labs / react-resource-router

Configuration driven routing solution for React SPAs that manages route matching, data fetching and progressive rendering
https://atlassian-labs.github.io/react-resource-router
Apache License 2.0
198 stars 28 forks source link

No longer recreating histories within render functions in documentation #150

Closed PatrickShaw closed 2 years ago

PatrickShaw commented 2 years ago

This PR makes it so that createBrowserHistory is no longer called again on each render function in the documentation eamples.

Why?

If you look at the implementation of the history API, you'll see that it does a few things that you probably don't want to have happen on every React render like adding event listeners.

I think the documentation should reflect this.