This sentence in the ReScript docs claims that ReScript objects are not update-able: “Disallowed unless the object is a binding that comes from the JavaScript side.”
I always viewed Object.set as kind of a backdoor, since needing to use a function call to update an object is a pretty clear sign to users that they’re off the paved path.
Maybe the wording of the docs could be updated to reduce confusion?
This is actually why we’re differentiating between objects and dicts in ReScript (they’re both compiled to JS objects under the hood), dicts are meant to be used with dynamic keys as you’re doing here so this looks correct.
On this topic, why don’t you use URLSearchParams instead of a plain object for query strings though?