At the beginning of this project, it would be great to have a simple textarea where you can click a button and then have a new post added to the static posts array we wrote in the App class.
Add this above the div with the feed class:
<div className="postForm"> <form onSubmit={this.handleSubmit}> <textarea value={postContent} onChange={this.handlePostContentChange} placeholder="Write your custom post!"/> <input type="submit" value="Submit" /> </form></div>
You can use forms in React without any problems. React can intercept the submit event of requests by giving the form an onSubmit property, which will be a function to handle the logic behind the form.
We are passing the postContent variable to ...