Skip to content

Drag13/react-hooks-examples

Repository files navigation

React hooks examples for the Free React Course For Beginners by Itera

Install

npm ci

Run examples:

State

State - a way to store the data that is subject to change!

npm run start:state

For the complex states - take a look into the useReducer

Effect

Effect - a way to intercept lifecycle events and perform side effects

npm run start:effect

Context

Context - a transport that allows you to get anything in the components without accessing props

npm run start:context

Callback

Callback - a way to memoize the function

npm run start:callback

Custom

Writing custom callback

npm run start:custom

Takeaways

  • Hook - a modern to API to functional components
  • Most useful are useState, useEffect
  • You can write your own hooks

About

This is the collection of examples for the course React for Beginners from Itera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published