Skip to content

Create imperative stream for mostjs, useful for bridging custom events source (e.g react)

License

Notifications You must be signed in to change notification settings

singggum3b/most-create

Repository files navigation

most-create

Create imperative stream for mostjs, useful for bridging custom events source (e.g react)

npm

Install

npm i -S most-create

Usage

create

Create a mostjs stream with ability to manually emit event. Based on Proxy

Type: function

Context: any

Target: any

Produce: stream

    private inputChangeStream = create<React.SyntheticEvent<HTMLInputElement>>("inputChangeStream");
    ...
    this.inputChangeStream.observe((e) => {
    	this.model.setDisplayValue(e.currentTarget.value);
    });
    ...
    public onInputChange = (e: React.SyntheticEvent<HTMLInputElement>): void => {
    	this.inputChangeStream.emit(e);
    };

License

Apache License 2.0

About

Create imperative stream for mostjs, useful for bridging custom events source (e.g react)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published