Yesterday, Fabian helped guide me to a solution for modifying and re-saving an array between Observable and S3.
Taking this one step further, my desire is to create input fields for my template array, so that I can point at a given array object, expose and edit the values in that object, and the re-save.
The trouble that I am currently facing is that each time I type something into an input field, each key stroke triggers my ‘write’ function (which references my data), with the rest being numerous incomplete arrays being written.
I have read
Introduction to Mutable State as well as the clear and helpful conceptual descriptions of mutables in A bit confused about ‘mutable’, etc . I also found and read Mutable Forms. Sadly, I am not yet understanding how to implement it.
Please help me verify my understanding:
If I am reading the examples correctly, then essentially the cell assigned a mutable operator should be linked to a reference operator, such that when both values are identical, the reference operator performs an action.
If this is correct, then I somehow need to determine how to construct a reference operator? I am at a bit of a loss for what this might look like for the purposes of my notebook
Also potentially related to understanding when and how to use mutables and determining places to put them: Whenever I reload my notebook, my ‘update’ cell runs on page load – appending a new record and saving it to S3 automatically. This isn’t intentional or wanted. Any suggestions for how to get around this?
Here’s a notebook with a test input: