Using React and Express, how can I store a favourite pet for a logged in user? Currently pulling the pets from an API and then using PostgreSQL for the DB
const favPetDetails = {
id,
name,
media,
breeds,
location,
distance,
sort,
url,
tags,
type,
gender,
contact,
environment,
attributes,
};
const addFavouritePet = (Pet) => {
const newFavList = [...favourites, Pet];
setFavourites(newFavList);
};
<button onClick={() => addFavouritePet(favPetDetails)} </button>