This is a solution to the Interactive comments section challenge on Frontend Mentor.
-
View the optimal layout for the app depending on their device's screen size
-
See hover states for all interactive elements on the page
-
Create, Read, Update, and Delete comments and replies
-
Upvote and downvote comments
-
Bonus: If you're building a purely front-end project, use
localStorageto save the current state in the browser that persists when the browser is refreshed. -
Bonus: Instead of using the
createdAtstrings from thedata.jsonfile, try using timestamps and dynamically track the time since the comment or reply was posted.
-
React - JS library
-
Styled Components - For styles
I tried doing this challenge as fast as possible. This resulted in creating this whole section using one functional component. The challenge would have been easier if i used two components. I learned to handle components that are larger than the ones I usually create. I practiced spreading in and splicing up objects in order to manipulate the main state object containing comments.
Veljko Ilic 2022.
