Design comparison
Solution retrospective
I am proud to utilize encapsulation
and closures
to make a notifications page with persistent data using localStorage
Encapsulation:
notificationsLogic encapsulates the data handling and processing logic.
notificationsUI encapsulates the presentation and HTML content manipulation logic.
Closures:
Closures aren't explicitly shown in this code, but they occur implicitly when functions access variables from their containing scope (e.g., fetchNotificationData accessing this.checkLocalData
).
LocalStorage Handling:
localStorage
checkLocalData and updateLocalData methods are used to interact with localStorage.
What challenges did you encounter, and how did you overcome them?Deploying this site to Netlify
was a little bit tricky as I am using Vite
.
The starter file images
were stored in assets/images
file path, but when deployed to Netlify
, the images were not dispalying at all
That is because for Vite
, we needed to store it in the root
file path or a folder called public
which acts as the root
At the moment, none.
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord