Releases: ptrbrynt/KotlinBloc
Releases · ptrbrynt/KotlinBloc
0.13
0.12: 💥 Add Emitter receiver to mapEventToState method
Previously, Bloc implementations could emit from anywhere, making it hard to enforce correct usage. This commit removes the emit method from BlocBase and moves it to a new Emitter interface, which is used as the receiver for mapEventToState. This allows us to enforce the pattern whereby Blocs can only emit within the mapEventToState method. Additionally, Cubits now implement the Emitter interface, maintaining their ability to emit from anywhere.