score:0

import Cookies from 'universal-cookie';
 
const cookies = new Cookies();

...

.then((res) => {
  const { token } = res.data;
 cookies.set('token', token , { httpOnly: true, path: "/" });
})

Related Query

More Query from same tag