I have a React application that allows users to select their "Favorite" items from a master/detail view...
I want the user to be able to open up the website, select their "Favorites" without having to sign in, reload the page, and have their Favorites saved "on the website." I've tried using PHP cookies from another origin (read here: You can't set Cookies from a fetch request). I don't want to include another npm
package (mostly because I just want to know what's really going on behind my dependencies), and the only solution I can come up with is to use
window.localStorage.setItem('key', 'value');
Am I right? Is there some other convention for this? What should I do?
Keep in mind: I'm running this on a Node.js server so I can't just set the cookies with a PHP request.