Split Album in to a separate component; Added a change listener to handle updates when a state changes;
The added benefit here is you guarantee that your view is reflecting a change has been committed to the database before you display the change and don't risk showing a dirty state (where the frontend thinks something has been marked as liked or disliked but the database maybe didn't save the changes or API didn't respond).
Split Album in to a separate component; Added a change listener to handle updates when a state changes;
The added benefit here is you guarantee that your view is reflecting a change has been committed to the database before you display the change and don't risk showing a dirty state (where the frontend thinks something has been marked as liked or disliked but the database maybe didn't save the changes or API didn't respond).