Sabrina Markon

React Hooks: useDebugValue()

Posted on July 10, 2020

The useDebugVlue React hook is meant to make debugging custom hooks easier by giving them our own custom names. When an error occurs we can see the custom name in the React DevTools stacka trace…

Read full post

React Hooks: useLayoutEffect()

Posted on July 08, 2020

In class-based React apps, we used lifecycle methods instead of hooks. For example, we could control the program using componentDidMount or componentDidUpdate. People familiar with coding classes tend…

Read full post

React Hooks: useImperativeHandle()

Posted on July 07, 2020

While the useImperativeHandle hook is not used often, it is available if we run across a situation where a child component's ref needs to be passed to its parent component to use. For example, a…

Read full post

React Hooks: useMemo()

Posted on July 05, 2020

Although the useCallback and useMemo React hooks seem similar, while useCallback is used to create a memoized callback function to child components, the purpose of useMemo, in contrast, is to create a…

Read full post

React Hooks: useCallback()

Posted on July 04, 2020

To understand the useCallback React hook, it helps to first understand the problem it is intended to solve. When we have a child component that needs to re-render often, all its functions will also…

Read full post