https://github.com/singhpratyush/react-delhi-ncr-hooks
Code from demo session for talk at React Delhi NCR's Feb 2019 Meetup
https://github.com/singhpratyush/react-delhi-ncr-hooks
hooks react
Last synced: 4 months ago
JSON representation
Code from demo session for talk at React Delhi NCR's Feb 2019 Meetup
- Host: GitHub
- URL: https://github.com/singhpratyush/react-delhi-ncr-hooks
- Owner: singhpratyush
- Created: 2019-02-16T14:50:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-18T12:57:10.000Z (over 6 years ago)
- Last Synced: 2025-03-21T22:14:27.443Z (8 months ago)
- Topics: hooks, react
- Language: JavaScript
- Size: 181 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Why do we need hooks?
Presentation slides are [here](https://docs.google.com/presentation/d/1Hhrkfew-2aCvDVK69Jgd9nriqYtCXygoaCQ7MxtHh2M/edit?usp=sharing).
```
$ npm start 🎉
```
This app contains a two-pane UI. Left one is written as a class component and the right one as a functional component.
In different branches, it is demonstrated how hooks help us in hook in awesome React utilities into our functional component.
-----
### `master`
The initial setup - Two panes with some text.
### `1-add-input`
Adding stateful input box in both the components.
### `2-update-firestore`
Updating firestore using the components' state.
### `3-context`
Using styles from context to beautify the components.
### `4-realtime-updates`
Handling side effects in the components.
### `5-custom-hooks`
Combining two hooks into one to create a custom one.
-----
**Note:** The branches are not incremental, checkout with care.
> This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).