Skip to content

posts/AddPostForm.js onSavePostClicked should check the userId too and also should clear the state too setUserId('') #8

Description

@mbedru
const onSavePostClicked = () => {
    if (title && content && userId) {
        dispatch(
            postAdded(title, content, userId)
        )
        setTitle('')
        setContent('')
       setUserId('')
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions