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