Sabrina Markon

React Hooks: useReducer()

Posted on July 03, 2020

To understand the useReducer React hook, it helps to first understand what a reducer actually is. First, a reducer is a function that executes code to update global state values depending on an…

Read full post

React Hooks: useContext()

Posted on July 01, 2020

The React useContext hook is used in combination with the React Context API. Without using Context in React, props that need to be shared between components are passed as attributes from parent to…

Read full post

React Hooks: useEffect()

Posted on June 30, 2020

When we update state, many apps also need to execute side-effects, such as making API calls, communicating with a database, or updating local storage. Since state causes re-renders, we can use the…

Read full post

React Hooks: useRef()

Posted on June 23, 2020

useRef is a React hook that mutates the current value of a variable that we can optionally initialize with an initial value or leave undefined. Its major difference to the useState hook is that it…

Read full post

React Hooks: useState()

Posted on June 23, 2020

React functional components use the useState React hook to keep track of "stateful" values, or variable value changes that we need to keep track of in our application. In the code below, you can see a…

Read full post