I think we want something like
```javascript
self.state = {};
self.state.name = state.name;
self.state.metadata = state.metadata;
```
Otherwise ``self.state`` can be an entirely different thing in some situations (which I think will be pretty confusing).