Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/driaug/use-medium
Get your latest Medium articles in React hook
https://github.com/driaug/use-medium
medium react react-hooks
Last synced: 10 days ago
JSON representation
Get your latest Medium articles in React hook
- Host: GitHub
- URL: https://github.com/driaug/use-medium
- Owner: driaug
- License: mit
- Created: 2022-05-15T10:36:57.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-14T10:40:38.000Z (over 2 years ago)
- Last Synced: 2024-10-11T10:51:14.464Z (about 1 month ago)
- Topics: medium, react, react-hooks
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/use-medium
- Size: 342 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![Decorative Banner](https://banners.beyondco.de/Use-Medium.png?theme=light&packageManager=yarn+add&packageName=use-medium&pattern=leaf&style=style_1&description=Get+your+latest+Medium+articles+in+React&md=1&showWatermark=0&fontSize=100px&images=rss)
## Installation
- `npm i use-medium`
- `yarn add use-medium`## Usage
```tsx
import { useMedium } from 'use-medium';const Articles = () => {
const articles = useMedium("driaug");return (
-
{article.title}
{article.description}
{articles.map(article => (
))}
);
};
```
## Remarks
### Proxy
This project makes use of a free Proxy service to access the Medium API. If for any reason you want to use another service then you can specify it in the configuration paramters
```ts
const articles = useMedium("driaug", {
proxy: "https://my-custom-proxy.com/"
});
```
The above configuration will result in the following endpoint: `https://my-custom-proxy.com/https://medium.com/feed/@driaug`.