Installation

Organizes package installation, peer dependencies, and import paths.


npm

bash
npm install @byeolnaerim/global-rx-state rxjs react

peer dependencies

reactand rxjsis a peer dependency. The React hook must match the app's React instance, and BehaviorSubjectit is exposed in the public API, so it is safer for the app and library to look at the same RxJS version.

js
{
  "peerDependencies": {
    "react": ">=18.0.0",
    "rxjs": ">=7"
  },
  "dependencies": {
    "localforage": "^1.10.0"
  }
}

import path

ts
import {
  createRxState,
  createRxStateTuple,
  createRxReducer,
  createRxReducerTuple,
} from "@byeolnaerim/global-rx-state";

// 필요한 영역만 subpath로 가져올 수도 있습니다.
import { createRxState } from "@byeolnaerim/global-rx-state/rx-state";
import { createRxReducer } from "@byeolnaerim/global-rx-state/rx-reducer";
© 2026 Byeolnaerim. All rights reserved.IntroductionPrivacy Policy