Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Docs do not reflect the actual types of histories available #64

Closed
asazernik opened this issue Sep 23, 2015 · 2 comments
Closed

Docs do not reflect the actual types of histories available #64

asazernik opened this issue Sep 23, 2015 · 2 comments

Comments

@asazernik
Copy link

The docs indicate three types of histories:

  • createHistory
  • createHashHistory
  • createMemoryHistory

In the code, there are two more:

  • createBrowserHistory
  • createDOMHistory

createBrowserHistory seems to actually be what the docs claim createHistory is, so it's unclear what createHistory actually does.

@agundermann
Copy link
Contributor

I changed the docs section about direct imports a bit (https://github.com/rackt/history/blob/master/docs/GettingStarted.md#minimizing-your-build), so maybe the correspondence is clearer now.

createHistory.js and createDOMHistory.js are used internally for shared functionality. You shouldn't use or import them directly, and they're not exposed in the module entry file.

createBrowserHistory.js is the HTML5 history type. It's the recommended one for browser apps, so it's exposed as createHistory from the entry file.

@asazernik
Copy link
Author

Ah - makes much more sense now. The name collision between the createHistory global function and the createHistory submodule was confusing me, but those two lines of change make the distinction a lot clearer :-)

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants