Rendering some output messages on every change is not possible

Hello!

We have a ShapeDiver implementation in our react project and we display info, warning and error messages based on some content from the outputs object.

To avoid multiple unwanted renders of the same message we have a useEffect that will render the message only if there a change but sometimes we want to show the same message - like an error - on every parameter change if the issue is not solved because the user didn’t revert the parameter changes that caused the error in the first place. To be able to show the same message on each update we were relying on the version of the output that seemed to be unique on each response from the output endpoint but that is not always the case.

Is this behavior expected? Is there a reason some messages have a new version on each output response and others don’t?

Thanks for the help.
Best,
David

The version of the output is a hash value computed from the values of the parameters that influence the output. The dependency property of an output tells you the ids of the parameters influencing the output.

This means the version of an output is only going to change if at least one parameter value which influences the output changes.

This section of our documentation explains the concepts behind outputs on a low level: Outputs on the API

Does this answer your question?

Thank you Alexander for the promt response, it clarifies the response we are getting in our apps.

Best,
David