0.4.5 • Published 6 years ago

justreactive v0.4.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

just-reactive

Ultra light-weight JavaScript reactive programming library.

Reactive Variable

const foo = Reactive.var(0);

Reactive(() =>
    console.log(foo.get()) //or via primitive call +foo
);

setInterval(() => foo.set(foo + 1), 500);

Reactive Object Properties

const foo = Reactive.object({bar: 0});

Reactive(() =>
    console.log(foo.bar)
);

setInterval(() => foo.bar++, 500);

Reactive Proxy Object

const foo = Reactive.proxy();

foo.bar = 0; //every defined proxy property is reactive

Reactive(() =>
    console.log(foo.bar)
);

setInterval(() => foo.bar++, 500);

Reactive Array

const foo = Reactive.array(1, 2, 3, 4);

Reactive(() =>
    console.log(foo.join())
);

setInterval(() => foo.push(foo.length + 1), 500);

Download the library

Install via npm

$ npm install justreactive --save
0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.2

6 years ago