Immer defaults to freezing all plain objects, which can cause errors when using nested stores. Solution: Modify the StoreDef interface to a class.