Im experimenting with random theme and "new technology" and Im trying to convert whole front-end to pure JS single page application (no page refreshes - like Facebook, Twitter etc) using WP REST API, Redux.js and React.js and few other helpers.
How to handle logged-in users? How do I keep track of that? I know that this information is normally handled with cookies. How would one check it via JS?
I could just make an ajax call every time route/url changes and use
is_user_logged_in() in server-side but it seems primative. Could I access directly to cookie via JS and check it in browser?
- I gave it a long thought if that's off-topic here but it really seems like a very WP specific question
- Im just experimenting and trying to push it to a new level, please no "this is a bad idea" comments