Simple way to use dev.to article API to show your articles on your portfolio website.

usaidpeerzada

Usaid

Posted on March 20, 2021

Simple way to use dev.to article API to show your articles on your portfolio website.

Do you want to set your dev.to articles to appear on your portfolio website?
Let me show you how I used the article API to get my dev.to posts on my portfolio website in just two steps.

  1. Just add your username at the end of this API-link: "https://dev.to/api/articles?username=yourUserName"
  2. Use axios to get your posts and then render it on the frontend.

simple example:

const getDevToPosts = () => {
axios
.get("https://dev.to/api/articles?username=usaidpeerzada")
.then((res) => {
setBlogState(res.data);
});
};

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
usaidpeerzada
Usaid

Posted on March 20, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About