0.4.2 • Published 2 years ago

revejs v0.4.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

REVEjs: Leve lib for reactive programing

What is Revejs?

Revejs is leve (Brazilian Portuguese word for "light") reactive library with API base on react hooks and solid-js.

Goal

Goal of Revejs is to be light and make reactive programing easy to use for beginners.
Revejs doesn't intend to compete with RXJS or other reactive libraries.

Installation

npm i revejs

Usage

Base of Revejs is signals like in solid-js and react state

const [getter, setter] = createSignal('init value');

Getters and setter is functions, so value can be access like this

console.log(getter())

And values set like this

setter('new value')

Reactive part of revejs are effects. They're just the functions that are called when setter is running

createEffect(
    () => console.log('it run on value change'), 
    [getter, anotherGetter]
)

Effect can be nested

createEffect(() => {
  createEffect(() => console.log(''), [getter])
}, [getter])
0.4.1

2 years ago

0.4.0

2 years ago

0.4.2

2 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago