After commenting on a post the comment line does not erase itself
ankan1811 opened this issue · 3 comments
ankan1811 commented
moamlrh commented
const onSubmit = () => { setCommentValue('') }
Hartaj-Singh-Dev commented
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('')
}
savarsri commented
Fixed in pull request 46