panda-river

6.0.3 • Public • Published

Panda River

Panda River is a JavaScript library for reactive programming in a functional style. River differs from libraries like RxJS by relying on JavaScript iterators and stand-alone functions (rather than method chaining). You can use the same functions whether you're working with arrays or events. And you can use common functional programming patterns, like composition and currying, to build up more powerful libraries.

Example

The hello world of reactive programming is the humble counter. Given:

  • dom.increment— a link that, when clicked, increments the counter
  • dom.counter — an element that displays the counter
  • data.counter — the application data, which, in this case, is just a counter
go [
  events "click"dom.increment
  map -> data.counter++
]
 
go [
  events "change"observe data
  map -> dom.counter.textContent = data.counter
]

Installation

npm i panda-river

API

Package Sidebar

Install

npm i panda-river

Weekly Downloads

7

Version

6.0.3

License

MIT

Unpacked Size

80.3 kB

Total Files

15

Last publish

Collaborators

  • dyoder
  • freeformflow