Get cookie with react
问题 I need to know if my user is connected or not. For that I want to read the cookies that I set in the server side with express-session : app.use(session({ secret: 'crypted key', resave: false, saveUninitialized: true, cookie: { secure: false } // Put true if https })) app.post('/connect_user', (req, res) => { req.session.cookie.username = req.body.username findUserData('username', req.body.username, req, (userData) => { req.session.cookie.id = userData.id req.session.cookie.username = userData