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

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

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).