mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 05:54:56 -06:00
19 lines
451 B
JavaScript
19 lines
451 B
JavaScript
// @flow
|
|
import { ReplaySubject } from 'rxjs';
|
|
import ProductRecord from '../records/ProductRecord';
|
|
|
|
type CreateProductState = {
|
|
product: ProductRecord,
|
|
loading: boolean,
|
|
error?: ?Error,
|
|
};
|
|
|
|
const multicaster: ReplaySubject<CreateProductState> = new ReplaySubject();
|
|
|
|
export function emitter(val: CreateProductState) {
|
|
multicaster.next(val);
|
|
}
|
|
|
|
emitter({ product: new ProductRecord(), loading: false, error: null });
|
|
|
|
export default multicaster;
|