SessionStorage
react-router

SessionStorage interface

SessionStorage stores session data between HTTP requests and knows how to parse and create cookies.

A SessionStorage creates Session objects using a Cookie header as input. Then, later it generates the Set-Cookie header to be used in the response.

Properties

commitSession

Type: { }

Stores all data in the Session and returns the Set-Cookie header to be used in the HTTP response.

destroySession

Type: { }

Deletes all data associated with the Session and returns the Set-Cookie header to be used in the HTTP response.

getSession

Type: { }

Parses a Cookie header from a HTTP request and returns the associated Session. If there is no session associated with the cookie, this will return a new Session with no data.

Docs and examples CC 4.0