Skip to content

No longer recreating histories within render functions in documentation #150

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conversation

PatrickShaw
Copy link
Contributor

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.

@liamqma liamqma merged commit 2c020ba into atlassian-labs:master May 4, 2022
@PatrickShaw PatrickShaw deleted the avoid-create-browser-history-in-render-functions branch May 6, 2022 10:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants