Skip to main content

1.4.0 (2023-06-14)

What's new ?

Signals

Signals are here !

A Signal is the sync version of an Observable. It provides a nice bridge between synchronous and asynchronous code.

Take a look at the documentation, and start playing with them !

Example

const counter = signal(0);

const isEven = computed(() => counter() % 2 === 0);

const color = computed(() => (isEven() ? 'red' : 'blue'));

effect(() => {
console.log('counter', counter(), 'isEven', isEven(), 'color', color());
});

fromEventTarget(window, 'click')(() => {
counter.update((currentValue) => currentValue + 1);
});

distinctObservablePipe

distinctObservablePipe accepts now an optional initialValue,and equal function.

Experimental

Add ObservableProxy