You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q: Is it possible to get cookies to talk to eachother within React?
A: I would just use localstorage which would be easier?
Q: Would this be a problem for browsers that don't support it?
A: As a proof of concept this wouldn't be a problem. It's also quite an old API so is quite widely supported.
If we were to go to the cookie route, on initial page load, we'd check for existence of the cookie, and serve loading view and a new cookie when it doesn't exist, or serve /home route otherwise. If it doesn't exists, we'd serve back the react app with a cookie. However cookies can't be sent over AJAX, only on pageload, which happens minimally on a React app.
It seems that storing this information in localstorage makes more sense for our use case
maxgerber
changed the title
Technical Spike - cookies with react/react-router
Technical Spike - cookies/localstorage with react/react-router
Sep 29, 2017
Cookies will allow us to only display the instruction modal the first time users use the site. Research needed to find out:
The text was updated successfully, but these errors were encountered: