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.
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.