Component for saving an object to localStorage