post_id not defined when comment form submitted
The comments table and the posts table are linked in my database through the forigen key post_id. I want when the comments form is submitted for the comments to then be displayed under the post on the singlepost page. This was happening until I abstracted the CommentsForm in order to allow the form to be cleared upon submisson, using a the reset react hook. Now when a comment is submitted, the form clears but no comment is displayed, as in the database the post_id of the comment is NULL.