@octanejs/rxjs
v0.1.36
Published
RxJS bindings for the octane renderer, based on React-RxJS.
Keywords
Readme
@octanejs/rxjs
React-RxJS bindings for octane.
Installation
npm install @octanejs/rxjs rxjs
pnpm add @octanejs/rxjs rxjsThe package reuses RxJS and @rx-state/core, replacing only the React hook and
component layer. Most applications can migrate by changing imports:
import { bind } from '@octanejs/rxjs';
import { interval } from 'rxjs';
const [useSeconds] = bind(interval(1000), 0);
function Clock() @{
const seconds = useSeconds();
<output>{seconds as any}</output>
}The root entry exports the core binding API. @octanejs/rxjs/utils mirrors the
complete framework-neutral @react-rxjs/utils surface.
Intentional differences
- A
StateObservableis not itself a renderable JSX node. Render its value withuseStateObservableor the hook returned bybind. @react-rxjs/domis not ported. Its only API wraps ReactDOM's legacyunstable_batchedUpdates; octane batches observable updates natively.- A state observable without a default value must be read inside
Subscribe, matching React-RxJS's subscription ownership contract.
The implementation is based on upstream commit
330f4c329f635c577e39655bd46c0d80a13f3a41.
