Dear Observable team, we are creating some interactive visualization apps over Observable. While developing reactive codes, there are a number of interesting technical issues. One of them is we found referenced cell within a function not reflecting latest reference
Dependency: “number of vertices” -> “graph” -> “transformGroup function”
Test case: change “number of vertices” from html input tag, and then drag the black rectangle. The drag call back function calls “transformGroup()”
Expected result: graph within “transformGroup function” reflects the latest reference
Actual result: graph within “transformGroup function” does not reflect the latest reference
(In above example, open developer console, the log shows graph references are different)
Our solution: either use mutable mutableGraph, or always pass “graph” as an input argument to “transformGroup function.”
Just want to know is it a suggested way to make “graph” mutable although the changes to graph only occurs within “graph” cell?