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

https://github.com/alexius-huang/react-server-side-state-management-demo

Demonstration of state mangement using React component local state / SWR and Tanstack React Query
https://github.com/alexius-huang/react-server-side-state-management-demo

Last synced: 3 months ago
JSON representation

Demonstration of state mangement using React component local state / SWR and Tanstack React Query

Awesome Lists containing this project

README

        

# React Server State Management Demo

This project's main purpose is to demonstrate how to perform state management in React, particularly comparing between:

- [x] Using built-in state
- [x] Using [SWR](swr.vercel.app)
- [ ] Using [Tanstack/React Query](https://tanstack.com/query/latest/docs/react/overview)

## How to Run?

1. Clone the project:

```bash
git clone [email protected]:Alexius-Huang/react-server-side-state-management-demo.git
```

2. Please use the latest stable version of Node, if you have node version manager:

```bash
nvm install latest
```

and then use the latest version:

```bash
nvm use
```

3. Install by running `yarn` or `npm`.

4. Run the server, simply: `node server.js`

5. Open another terminal session and run the client, run: `yarn start` or `npm run start`

6. Navigate to `http://localhost:3000/`