Medium is becoming the popular platform for writing blogs, writing about your projects, and a lot more. On the other hand, React is also becoming very popular among the developers to create dynamic responsive web applications. In this article, I am going to show how you can embed medium blogs on your react app using API. Using the same API you can embed medium blogs on any frontend web applications. In this article, I am going to say how to start from scratch.

Image for post

Step 1: Setting Up React Project

First, we need to create a react application. For that run the following command in your shell/terminal in a specific folder (e.g., desktop )

npx create-react-app medium-blogs-on-react

A new folder will be created with the name you have given in your command. So for me, it is medium-blogs-on-react. Then you can go to the choice of your IDE to work on it. I personally use the VS Code

Step 2: Manage your folder Structure

So you can choose your folder structure according to your choice. I personally prefer to move all components inside components folder like as shown below

Image for post

Inside the Component folder, I have made two components. Blog and Show Blog. The purpose of the Blog component is to use an API and get all the post and pass it down as props to Show Blog Component

#javascript #blogging #api #react #blog

How to Add Medium Blogs on your React App
11.85 GEEK