🎯
Type-Safe State Containers
Strong TypeScript inference for state, instances, and registry helpers.
Type-safe state containers with React integration
import { Cubit } from '@blac/core';
import { useBloc } from '@blac/react';
class CounterCubit extends Cubit<{ count: number }> {
constructor() {
super({ count: 0 });
}
increment = () => this.emit({ count: this.state.count + 1 });
}
function Counter() {
const [state, counter] = useBloc(CounterCubit);
return <button onClick={counter.increment}>{state.count}</button>;
}npm install @blac/core @blac/react