# A question about the documentation

**URL:** <https://discourse.nodered.org/t/a-question-about-the-documentation/92476>\
**Category:** General\
**Tags:** documentation, dashboard-2\
**Created:** [17 October 2024 22:00 UTC](https://discourse.nodered.org/t/a-question-about-the-documentation/92476 "2024-10-17T22:00:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [17 October 2024 22:00 UTC](https://discourse.nodered.org/t/a-question-about-the-documentation/92476/1 "2024-10-17T22:00:55Z")

</div>

In the [documentation for dynamic properties](https://dashboard.flowfuse.com/user/dynamic-properties.html), it says

> ## Updating Classes
> 
> If we consider an example with a `ui-button`, you can send the following `msg` to the button itself:
> 
> json
> 
> ```auto
> msg = {
> "ui_update": {
> "class": "my-class"
> }
> }
> 
> ```
> 
> ...  
> **Note also that `msg.class` injection is still supported for legacy reasons, but it is recommended to use `ui_update.class` where possible.**

Can anyone explain why it deprecates msg.class?

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [18 October 2024 08:20 UTC](https://discourse.nodered.org/t/a-question-about-the-documentation/92476/2 "2024-10-18T08:20:42Z")

</div>

> [@jbudd](#):
>
> Can anyone explain why it deprecates msg.class?

It was purely a consistency thing. We were introducing dynamic properties across all nodes for pretty much every property, so couldn't justify `msg.label`, `msg.chartType`, etc.

As such, we nested into `msg.ui_update.<property>`, and for consistency, didn't want `msg.class` to be the only property that didn't

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 October 2024 08:34 UTC](https://discourse.nodered.org/t/a-question-about-the-documentation/92476/3 "2024-10-18T08:34:38Z")

</div>

To add to what Joe said: It was determined that nesting the updates in a property made it _less likely_ to affect UI nodes by accident.

e.g. suppose we added dynamic property support for `target`, `status`, `timeout` to a particular UI node. New users may not be aware of these additional properties being populated in the message from some upstream nodes - so nesting all new dynamic props in `ui_update` helps avoid these collisions.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 November 2024 08:35 UTC](https://discourse.nodered.org/t/a-question-about-the-documentation/92476/4 "2024-11-01T08:35:34Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
