DEV Community

vigneshiyergithub
vigneshiyergithub

Posted on

3 2

React custom hook npm package to fetch Dev.to blogs

Introduction

I wrote a React custom hook to fetch dev.to blogs. This hook was inspired when I was trying to integrate dev.to blogs to my personal portfolio website

Installation

yarn add dev-to-blogs-hook
npm i dev-to-blogs-hook
Enter fullscreen mode Exit fullscreen mode

Usage

The hook provides 3 params : blogs, fetching , error

import { useDevToBlogs } from "dev-to-blogs-hook";

const { blogs, fetching, error } = useDevToBlogs({userName : 'devToUserName'})
Enter fullscreen mode Exit fullscreen mode

Conclusion

A simple react hook to integrate with your React apps.

Top comments (1)

Collapse
 
ecyrbe profile image
ecyrbe

For more options you can also take a look at my example with zodios library and combine it with @zodios/react

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay