Yes, leave the example, but remove the documentation about having to twiddle the state objects directly and instead implement it in the manner you have added. And call out the case of serializers and deserializers as being the use cases for the values.