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

Explain the process of "session state", login/logout, with ReactJS, SPA #31

Closed
justjacksonn opened this issue May 13, 2015 · 1 comment

Comments

@justjacksonn
Copy link

You may cover this topic, not entirely sure, but one other area of confusion for me around SPA in general, but ReactJS in particular is handling login, logout, and maintaining session state. In particular, if a user's browser closes (accidentally, crashes, etc), and the user then restarts it and goes back to the site.. they should remain logged in. How does a ReactJS application manage the state, and return the user to where they were within the application?

This topic could also be applied to something similar, like a web cart... back in the day, web carts typically stored data in HttpSession on the server side, but today with our stateless Rest APIs and Ajax requests, how would a SPA and in this case ReactJS application maintain state across requests, browser restarts, etc.

@bebraw
Copy link
Member

bebraw commented Oct 1, 2015

If we do #76 at some point, this discussion should go there. A good blog post topic as well. Closing.

In short, there are standard techniques (sessions, cookies, whatnot) that go beyond React. The same ideas apply here. In addition Relay/GraphQL and Falcor likely have something to say on this matter.

@bebraw bebraw closed this as completed Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants