# What is the difference between Input and State?

**URL:** <https://community.plotly.com/t/what-is-the-difference-between-input-and-state/35219>\
**Category:** Dash Python\
**Created:** [February 20, 2020, 6:44am UTC](https://community.plotly.com/t/what-is-the-difference-between-input-and-state/35219 "2020-02-20T06:44:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonywang531](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@tonywang531](https://community.plotly.com/u/tonywang531)\
**Post date:** [February 20, 2020, 6:44am UTC](https://community.plotly.com/t/what-is-the-difference-between-input-and-state/35219/1 "2020-02-20T06:44:37Z")

</div>

I am a little bit confused with the difference of app.Callback Input and State. Let’s say there are two options for a range slider when the callback is fired:

```auto
    Input('my-range-slider', 'value'),
    State('my-range-slider', 'value')

```

What is the practical difference between each? When should one use over the other?

---

<div class="post-metadata">

**Author:** ![flyingcujo](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@flyingcujo](https://community.plotly.com/u/flyingcujo)\
**Post date:** [February 20, 2020, 11:56am UTC](https://community.plotly.com/t/what-is-the-difference-between-input-and-state/35219/2 "2020-02-20T11:56:09Z")

</div>

`Inputs` will trigger your callback; `State` do not. If you need the the current “value” - aka `State` - of other dash components within your callback, you pass them along via `State`.

See [https://dash.plot.ly/state](https://dash.plot.ly/state) for some examples.

---

<div class="post-metadata">

**Author:** ![tonywang531](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@tonywang531](https://community.plotly.com/u/tonywang531)\
**Post date:** [February 20, 2020, 11:56pm UTC](https://community.plotly.com/t/what-is-the-difference-between-input-and-state/35219/3 "2020-02-20T23:56:34Z")

</div>

What you said does make sense. So using state could reduce the number of callbacks which gives a better performance?

---

<div class="post-metadata">

**Author:** ![flyingcujo](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@flyingcujo](https://community.plotly.com/u/flyingcujo)\
**Post date:** [February 21, 2020, 11:50am UTC](https://community.plotly.com/t/what-is-the-difference-between-input-and-state/35219/4 "2020-02-21T11:50:29Z")

</div>

Not sure I follow that. Depending on how you construct your callbacks, and how much data you pass around, could affect performance. Your callbacks are triggered whenever the `Input` conditions are met; generally speaking, I don’t see how including (or not including) `State` parameters will provide better performance.
