Multiparadigm state manager for React by ~2 kB.
Slava Birch
Posted on February 4, 2021
Realar multiparadigm state manager for React based on reactive mathematic.
Light, Fast, and Pretty looked π
Targeted to clean code, modulable architecture, and time of delivery user experience.
Supported two kinds of data and logic definitions.
- Plain functional reactive programming with only functions
const [getCount, set] = box(0);
const tick = () => set(getCount() + 1);
setInterval(tick, 200);
const App = () => {
const count = useValue(getCount);
return (
<p>{count}</p>
)
}
- And transparent functional reactive programming with classes, decorators and jsx wrapper
class Ticker {
@prop count = 0
tick = () => ++this.count;
}
const ticker = new Ticker();
setInterval(ticker.tick, 200);
const App = () => (
<p>{ticker.count}</p>
)
Try wrapped version on CodeSandbox
Realar targeted to all scale applications up to complex enterprise solutions on microfrontends architecture.
You can use as many from Realar as you want. For small websites or theme switchers, two functions are enoughπ Step by step on applications scale stairs you can take more and more. From sharing state to all application parts, to modulable architecture with apps composition.
Posted on February 4, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.