Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/p-adams/react-auto-refresh

Voting app to demonstrate polling using react-query
https://github.com/p-adams/react-auto-refresh

Last synced: 2 days ago
JSON representation

Voting app to demonstrate polling using react-query

Awesome Lists containing this project

README

        

## react-auto-refresh

A voting app to demonstrate how to use react-query `refetchInterval` API to poll an endpoint.

### Getting started

Clone repo:

`git clone [email protected]:p-adams/react-auto-refresh.git`

Install server dependencies:

```
cd react-auto-refresh/src/server
npm install
npm run serve
```

Local server runs on port `4001`

Install client dependencies:

In a new tab, run:

```
npm install
npm run dev
```

from the root of `react-auto-refresh`

Local dev server runs on port `3000`