Simple way to use dev.to article API to show your articles on your portfolio website.
Usaid
Posted on March 20, 2021
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.
- Just add your username at the end of this API-link: "https://dev.to/api/articles?username=yourUserName"
- 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);
});
};
๐ ๐ช ๐
๐ฉ
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
react How to build type-enforced UI components in React Native using @shopify/restyle
November 28, 2024
react Double the Talk, Double the Recording: Capturing Both Sides in Interpreted Zoom Meetings
November 27, 2024