/react-delhi-ncr-hooks

Code from demo session for talk at React Delhi NCR's Feb 2019 Meetup

Primary LanguageJavaScript

Why do we need hooks?

Presentation slides are here.

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