Run nx build store-subject
to build the library.
Run nx test store-subject
to execute the unit tests via Jest.
import { StoreSubject } from '@dgaa/store-subject';
const storeSubject = new StoreSubject(1);
storeSubject.subscribe((currentValue) => {
console.log(currentValue); // 1
);
storeSubject.next(2); // Will log 2
storeSubject.getValue(); // Will return 2