register<T> method
Registers store as the store for component type T. Throws if a store
for T is already registered.
Implementation
void register<T>(ComponentStore store) {
if (_stores.containsKey(T)) {
throw StateError('A store for $T is already registered.');
}
_stores[T] = store;
_all.add(store);
}