✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Dependencies two ways

Hi. I have the following ‘problem’, that I’ve simplified to this.

If I have two values, one for x, one for x^2.

If x is updated, I can, in the call back, have x^2 as the output. So far very simple.

Now I would like a call back when the x^2 is changed, such that I can calculate the square root of x^2, and place it in the x value.

ie. The fields work both ways. [The actually problem is a more complex calculation].

How do I do this?

Does it prevent a continuous cascade of updates?

Thanks.