Intro to RecksJS

NPM Bundlephobia MIT license

Official docs: recks.gitbook.io

RecksJS is a framework based on streams

import Recks from 'recks';
import { timer } from 'rxjs';

function App() {
  const ticks$ = timer(0, 1000);

  return <div>
    <h1>{ ticks$ }</h1>
    <p>seconds passed</p>
  </div>
}

Try it in this online sandbox or install locally

⚠️ RecksJS is currently in beta

🔎 Overview

Observables are first class citizens in Recks ❤️

You can also do other way around: map a stream on JSX

Recks will subscribe to and unsubscribe from provided streams automatically, you don't have to worry about that!

And you can use Promises that will display the result, once resolved:

To get a better understanding of Recks concepts, read this article: "Intro to Recks: Rx+JSX experiment" and check out API docs section

📖 Examples

1. Hello world

Just a basic, no "moving parts"

2. Timer

RxJS' timer here will emit an integer every second, updating the view

online sandbox

3. Greeting

Uses a simple Subject to store local component state:

online sandbox

4. Counter

Traditional counter example with a Subject:

online sandbox

📚 Docs

Continue reading:

Last updated

Was this helpful?