---
title: "Discussion on \"understanding the useReducer Hook\" | Hashnode"
description: "Discussion on \"understanding the useReducer Hook\". The useReducer hook was one React hook that every time I had to use it, I wasn't sure of exactly what was going on and if I needed it.\nconst [state, dispatch] = useReducer(reducer, initialState);\n// you can also pass an optional init function as the ..."
url: "https://hashnode.com/posts/understanding-the-usereducer-hook/5f295659e7ab9713fa20813d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [understanding the useReducer Hook](https://chibuokemjerry.hashnode.dev/understanding-the-usereducer-hook?utm_source=hashnode&utm_medium=feed)

The useReducer hook was one React hook that every time I had to use it, I wasn't sure of exactly what was going on and if I needed it. const \[state, dispatch\] = useReducer(reducer, initialState); // you can also pass an optional init function as the ...

Aug 4, 2020 · 11 min read · chibuokemjerry.hashnode.dev  
Read the article

## Written by

[Chibuokem Jerry](https://hashnode.com/@jerrybuks)

@jerrybuks

  
[View profile](https://hashnode.com/@jerrybuks)

Front-end developer

## Responses 4

Markdown supported · ⌘↵ to post

[Iheanyi Ihekweaba](https://hashnode.com/@Iheanyi25)

[Nov 30, 2021](https://hashnode.com/posts/understanding-the-usereducer-hook/5f295659e7ab9713fa20813d/comment/61a5fd5b2edb6f3a062314f9)

Nice article Jerry. Thanks alot!

[Ekikere-abasi Michael Ekere](https://hashnode.com/@NzakiCodes)

[Aug 4, 2020](https://hashnode.com/posts/understanding-the-usereducer-hook/5f295659e7ab9713fa20813d/comment/5f2967e16face9141b78fb18)

This is Awesome. I have bookmarked it to read later.

[Victoria Lo](https://hashnode.com/@victoria)

[Aug 4, 2020](https://hashnode.com/posts/understanding-the-usereducer-hook/5f295659e7ab9713fa20813d/comment/5f29615c6face9141b78fadb)

Great article! Bookmarked :)

[Chibuokem Jerry](https://hashnode.com/@jerrybuks)

[Aug 4, 2020](https://hashnode.com/posts/understanding-the-usereducer-hook/5f295659e7ab9713fa20813d/comment/5f29615c6face9141b78fadb#reply-5f296796e7ab9713fa208223)

Thank you!

[Bolaji Ayodeji](https://hashnode.com/@bolajiayodeji)

[Aug 4, 2020](https://hashnode.com/posts/understanding-the-usereducer-hook/5f295659e7ab9713fa20813d/comment/5f2957366face9141b78fa5a)

This is amazing, thanks for sharing!

[Chibuokem Jerry](https://hashnode.com/@jerrybuks)

[Aug 4, 2020](https://hashnode.com/posts/understanding-the-usereducer-hook/5f295659e7ab9713fa20813d/comment/5f2957366face9141b78fa5a#reply-5f29584c6face9141b78fa73)

Thank you, Bolaji!.
