https://github.com/serpo-dev/rq-news
Show and cache news using React Query library.
https://github.com/serpo-dev/rq-news
caching news newsapi react react-query
Last synced: 2 months ago
JSON representation
Show and cache news using React Query library.
- Host: GitHub
- URL: https://github.com/serpo-dev/rq-news
- Owner: serpo-dev
- Created: 2023-06-11T04:49:01.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-16T05:43:45.000Z (almost 3 years ago)
- Last Synced: 2025-09-11T19:51:49.259Z (10 months ago)
- Topics: caching, news, newsapi, react, react-query
- Language: TypeScript
- Homepage: https://serpo-dev.github.io/rq-news/
- Size: 14.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RQ-NEWS 📰
Displays world news and caches them by pages until new data is fetched usding the React Query library.
Uses an API of the https://newsapi.org/
### Live Demo 🔴
- You can check it out by following this link 🔗 :
`https://serpo-dev.github.io/rq-news/`
❗ In live demo the news list is not fetching, because the API blocks non-localhost requests. For trying the full mode you need to clone this repo and run it as a dev server on your local machine.

### Demo Pic 🖥️

### Usage 📙
1. Install the node packages:
```
npm install
```
2. Create `.env` file and insert variables (read below ".env configuration")
3. Run the application by the command:
```
npm run start
```
### .env configuration
```
REACT_APP_PAGE_SIZE=
// get it from https://newsapi.org/
// free account limits: 50 reqs per 12 h
TOKEN=
```