Subscribes a component to the given key.
This returns a StateValue, which can be dereferenced (via state_value.value) and set (via state_value.set. This triggers a re-render for all subscribed components). All state values produced by this method share the same subscription list. The state value can also be passed to child components, which can subscribe to it without knowing about the underlying StateManager.
Component) – component to subscribe
str) – key to subscribe to.
- Return type