← Return

Blog PostMedium

Your task is to create a React application called "Blog Post" that allows users to create, display, and delete blog posts. The application requirements are detailed below, and the finished application must pass all of the unit tests.

Detailed Requirements

  1. The "Blog Post" component should have two input fields: one for the post title and another for the post description (textarea).
  2. The application should display a "Create" button that, when clicked, adds a new blog post to the list of existing posts.
  3. The "Create" button should only add a post if both the title and description fields have values. If either field is empty, the button should not create a post.
  4. Once a post is successfully created, both the title and description fields should be cleared.
  5. The list of created blog posts should be displayed in a grid layout, with each post appearing inside a box.
  6. Each box should include:
    • The post's title.
    • The post's description.
    • A "Delete" button to remove the specific post from the list.