I can save a string to local browser storage with
Browser.localStorage.setItem(key, str)
but when I try to stringify a discriminated union (e.g. by calling string
on it), it comes out as [Object object]
.
Since the FSharp.Reflection
and enum-manipulation functions are not supported in Fable, how can I save and load a DU or enum value (without doing a bunch of extra work for every case)?