concept setValue in category dsl

appears as: setValue
Domain-Specific Languages Made Easy

This is an excerpt from Manning's book Domain-Specific Languages Made Easy.

We do that by adding a property setValue to the edit state object. This property holds a function which receives the new value as its first and only argument, and which should update the settings["name"]. Its key-value-pair looks as follows:

setValue: (newValue) => settings["name"] = newValue

Technically, the setValue property is not really (part of the application) state: it only modifies real state. It’s simply convenient to pass this function as property of the edit state object.