@adram3l3ch
Posted
Hey congratulations for finishing this challenge, You can store the comments as an object and store the object in local storage. Then load it on initial load. Whenever you update coments update local storage too
Marked as helpful
Looking to hire developers?
Submitted
@Ofcl-Javed
Want to know how to apply localStorage functionality to the code
@adram3l3ch
Posted
Hey congratulations for finishing this challenge, You can store the comments as an object and store the object in local storage. Then load it on initial load. Whenever you update coments update local storage too
Marked as helpful
@Ofcl-Javed
Posted
Yess buddy i was able to store the comments by object and load them on page refreshing but the thing is when i update/edit the comment it create new one in local storage . In past I've created a Google keep clone app in which the same functionality is applied but in that case i just have to save textarea value so i just select all textarea and save it whenever one changes and update the local storage but in this comment section i have to store time too which became a problem with me, although thanks for your help
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