@d2k/react-devto
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

@d2k/react-devto

React hooks for Dev.to integrations

You'll need to install react, react-dom, etc at ^16.8.4

Install

npm i @d2k/react-devto --save

Usage

import {
  useArticles,
  useFollowSuggestions,
  useTags,
  useUser
} from "@d2k/react-devto";

const MyComponent = () => {
  // useArticles(page, tag, username)
  const { articles, loading, error } = useArticles();

  // useFollowSuggestions()
  const { suggestions, loading, error } = useFollowSuggestions();

  // useTags(page)
  const { tags, loading, error } = useTags();

  // useUser(username, id)
  const { user, loading, error } = useUser("bdbch");
};

Readme

Keywords

Package Sidebar

Install

npm i @d2k/react-devto

Weekly Downloads

2

Version

1.0.8

License

MIT

Unpacked Size

10.7 kB

Total Files

13

Last publish

Collaborators

  • d2k