---
title: "Discussion on \"Is it ok to pass setState as a prop in React?\" | Hashnode"
description: "Discussion on \"Is it ok to pass setState as a prop in React?\". No, it's not\nIt's possible to pass setState as a prop in React. However, it's not the recommended way to deal with updating state triggered by child components.\n\nPassing down setState makes it hard to reason about the state of the component.\n\nState m..."
url: "https://hashnode.com/posts/is-it-ok-to-pass-setstate-as-a-prop-in-react/66783c0382eddce18ebd318c"
---

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

Discussion

# [Is it ok to pass setState as a prop in React?](https://tigerabrodi.blog/is-it-ok-to-pass-setstate-as-a-prop-in-react?utm_source=hashnode&utm_medium=feed)

No, it's not It's possible to pass setState as a prop in React. However, it's not the recommended way to deal with updating state triggered by child components. Passing down setState makes it hard to reason about the state of the component. State m...

Jun 23, 2024 · 2 min read · tigerabrodi.blog  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#best-practices](https://hashnode.com/tag/best-practices)
-   [#programming](https://hashnode.com/tag/programming)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#clean-code](https://hashnode.com/tag/clean-code)

## Written by

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

@tigerabrodi · Germany

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

Obsessed with crafting software.

Just a guy who loves to write code and watch anime.

## Responses 1

Markdown supported · ⌘↵ to post

[Pavel](https://hashnode.com/@pavel827)

[Jun 26, 2024](https://hashnode.com/posts/is-it-ok-to-pass-setstate-as-a-prop-in-react/66783c0382eddce18ebd318c/comment/667bdf80bb6642d048a1b29b)

Disagree, it is perfectly OK. First approach looks most clean and easy to understand. Context for this? Overengineering. Passing callbacks? What if you want to increment by custom amount? You would have to pass callback with arguments and in that case it is better to pass just setter. Also setState has stable reference AFIAK, so no need to use useCallback later.
