mukeshphulwani66/Instagram-clone-MERN-Stack

After commenting on a post the comment line does not erase itself

ankan1811 opened this issue · 3 comments

issue1

Check this issue.
The comment line must be empty after commenting.

const onSubmit = () => { setCommentValue('') }

yes You have to create state and then fill the input of comment box as <input value={comment} onChange={(event)=>{setcomment(event.target.value)}/> and then you have to create a submit button like this <button onClick={()=>{Submit()}}>Post
and now you can define the 'Submit()' function as
const Submit = ()=>{
setcomment('')
}

Fixed in pull request 46