How to make a input button in Redux?

Good day,
Wrote at the time, the comments section using React. Now, mastering Redux, trying to rewrite the same code under it, confused about how to implement the button read data from Input and Textarea.
import React from "react";

const AddComment = ({ addComment }) => {
 return (
<form>
 <input type="text" name="name" placeholder="Enter name" />
 <textarea type="text" name="comment" placeholder="Enter comment" />
<input
type="button"
value="Enter"
 onClick={ev => {
addComment(ev.target.value);
 ev.target.value = "";
}}
className="submitBtn"
/>
</form>
);
};

export default AddComment;
April 3rd 20 at 17:31
2 answers
April 3rd 20 at 17:33
No relation to Redux this task has not.
You need somewhere to store the data of Input and Textarea.
You can use ref, you can use state (or hooks)

Try to deal with it themselves, it's basic stuff
April 3rd 20 at 17:35
It is not clear what exactly you have confusion. Now on button click, call reducer as payload you will have the object with data from the form.

Find more questions by tags JavaScriptReactRedux