-
Notifications
You must be signed in to change notification settings - Fork 8
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 about server side usage? #7
Comments
Drat, I knew I forgot something! This is mostly right. A few caveats:
I'll look into setting up support (for the cached route map to avoid rebuilding it on every request) and docs, but probably not until the weekend. |
Ah, right! Haven't noticed that
The line you pointed to creates memory history only if |
Right, so either you create one per request or |
Why? What can go wrong if it'll be stateless? It will just be used to match urls and create location objects. |
It's probably okay but I'm not 100% sure, and we don't document the pattern anyway. But either way that's orthogonal, right? If you're just using That part doesn't change with this package; you just move the history creation into your own code. |
@th0r What was your final solution here for setting it up on server-side? Following what you have above gives me the following error.
It seems that Any thoughts/insights or your final solution would be most helpful! |
Seems like you're not calling |
At first, thanks a lot for a great work, man!
Works like a charm but it took me a while to make it work server side with
match()
and I just want to share my solution here:Maybe add docs about it to readme?
The only thing I don't like here is necessity to create new server history per request.
This is because the underlying memory history created by
createMemoryHistory
is stateful but there is no need for this on server.Do you know maybe someone has already created some kind of stateless
createServerHistory
and open sourced it?The text was updated successfully, but these errors were encountered: