You could store your state in DOM and serialize the entire page. Not very elegant, but it works and is relatively straightforward. Although, the mental leap required to represent your state via attributes is probably higher for most devs than even immutable data structures.