interactive comments section with React

Solution retrospective
I was having a problem with double form submission. When I make a new comment, it creates another empty comment. The problem seems that the submission handler updates two states, and the strict mode of React ended up running the submission twice. I could be wrong with the cause, but I ended up preventing an empty comment from being sent. There is probably a better way to deal with the situation, though.
I tried to cover as much functionality of the app by integration testing. However, it was a slow moving process and I could not finish as much as I wanted to. Hopefully, as I get used to the testing framework (vitest + testing-library), I will be able to do it more efficiently in the future.
What specific areas of your project would you like help with?I will be grateful for any comments/suggestions on improving the design and the implementation.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on toshirokubota’s solution.
Join 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