Skip to content

Nrgy.js

energy

Nrgy.js is a TypeScript-first toolkit for reactive state, effects, and MVC/MVVM-style application architecture.

licenceCoverage Status

Project Description

Nrgy.js provides a set of small packages for building reactive applications with explicit lifecycle management and optional integrations for React, RxJS, rx-effects, and ditox.

Project Overview

The project is organized around a few core ideas:

  • atoms and computed atoms for reactive state;
  • effects and schedulers for deterministic change propagation;
  • scopes for ownership and cleanup of resources;
  • controllers and view models for MVC/MVVM business logic;
  • optional integration packages for React, ditox, RxJS, and rx-effects.

The packages are designed to work independently, so consumers can adopt only the pieces they need.

Main Features

  • Reactive state with atom(), compute(), and effect()
  • Explicit lifecycle management through Scope
  • MVC/MVVM primitives for controllers and view models
  • React integration through hooks and higher-order components
  • RxJS and rx-effects interoperability
  • Dependency injection integration with ditox
  • Strict TypeScript-first API surface

Changelog

Installation

Install only the packages you need:

PackagePurposeInstall
@nrgyjs/coreReactive runtime, scope, MVC/MVVM primitivesnpm install @nrgyjs/core
@nrgyjs/reactReact bindings for atoms, controllers, and view modelsnpm install @nrgyjs/core @nrgyjs/react react
@nrgyjs/ditoxditox dependency injection extensionsnpm install @nrgyjs/core @nrgyjs/ditox ditox
@nrgyjs/ditox-reactReact bridge for ditox + Nrgy controllersnpm install @nrgyjs/core @nrgyjs/ditox @nrgyjs/react @nrgyjs/ditox-react ditox ditox-react react
@nrgyjs/rxjsRxJS interoperabilitynpm install @nrgyjs/core @nrgyjs/rxjs rxjs
@nrgyjs/rx-effectsrx-effects interoperabilitynpm install @nrgyjs/core @nrgyjs/rxjs @nrgyjs/rx-effects rx-effects rxjs

Documentation

Package List