Monday, February 18, 2019

Reactjs Hooks

As per Reactjs docs:

A Hook is a special function that lets you "hook into" React features.

- in other word -

Hooks are functions that let you 'hook into' React state and lifecycle features from function components. 

References:
https://medium.com/free-code-camp/learn-the-basics-of-react-hooks-in-10-minutes-b2898287fe5d (very simple and elegant way of explanation)
https://reactjs.org/docs/hooks-intro.html
https://daveceddia.com/usecontext-hook/

Good examples on:


A simple example on using some of the hooks:
NOTE:
  1. Once you create app using create-react-app, remove all the files in public and src folders.
  2. Add index.html in public folder and rest of the files in src folder











Wednesday, October 31, 2018

Wednesday, August 29, 2018

npm config set strict-ssl false

When you have issues like SECURE KEY CHAIN while doing npm install on Mac, use the command:

npm config set strict-ssl false