This repository was archived by the owner on Jul 19, 2020. It is now read-only.
This repository was archived by the owner on Jul 19, 2020. It is now read-only.
Have the State type be converted to String for storage in History API #185
Closed
Description
Description
The state type is usually ()
, because support for actually storing data in the history api is difficult due to only JS types found in StdWeb being supported.
Instead, always store a string, and use Serde to transform your data into and out of JSON (or possibly bincode - maybe a feature flag for this?)
This shouldn't change the external interface too much, except that now types other than ()
and String
would be able to be possible to store. I think the bound on JsSerializable
should be dropped.