https://github.com/ashubham/apollo-local-state-demo
Sample Application using Apollo with useContext/useReducer
https://github.com/ashubham/apollo-local-state-demo
Last synced: 22 days ago
JSON representation
Sample Application using Apollo with useContext/useReducer
- Host: GitHub
- URL: https://github.com/ashubham/apollo-local-state-demo
- Owner: ashubham
- Created: 2020-01-14T21:48:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T05:13:12.000Z (over 2 years ago)
- Last Synced: 2024-03-17T23:21:49.168Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.05 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Apollo with useContext/useReducer
### Features
- Apollo's `useQuery``useMutation` hooks for backend driven state.
- Apollo Cache API for derived state on the client.
- useReducer/useContext for App wide client only state sharing
- For Alerts, Tab state.
### About- This uses Flickr's Photo search API to list images matching the search query on the left panel.
- On dblClicking a photo, it gets added to the Board on the right.
- The Boards tab lists all the boards on the server.
- Click on an item on that list to go to that saved board.
- Boards are stored inmemory of the server, so restarting the server clears the board list.### Server
```bash
cd server && npm i && npm start
```### Client
Make sure the server is running before you start up the client. To get the full experience, install the [Apollo VS Code extension](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) for some extra magic. ✨
```bash
cd client && npm i && npm start
```