Intro to RecksJS

NPMarrow-up-right Bundlephobiaarrow-up-right MIT licensearrow-up-right

Official docs: recks.gitbook.ioarrow-up-right

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 sandboxarrow-up-right or install locallyarrow-up-right

⚠️ 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"arrow-up-right and check out APIarrow-up-right 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 sandboxarrow-up-right

3. Greeting

Uses a simple Subjectarrow-up-right to store local component state:

online sandboxarrow-up-right

4. Counter

Traditional counter example with a Subjectarrow-up-right:

online sandboxarrow-up-right

📚 Docs

Continue reading:

Last updated

Was this helpful?