npm.io
2.7.1 • Published 2d ago

@modular-react/core

Licence
Version
2.7.1
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
6

@modular-react/core

React binding facade over @modular-frontend/core. It re-exports the full framework-neutral surface (module descriptor types, slot/navigation builders, validation, journey contracts, and a lightweight store) so React apps and the @react-router-modules/* / @tanstack-react-modules/* packages import everything from @modular-react/core unchanged.

The framework-neutral logic and types live in @modular-frontend/core. This package exists so React consumers keep a stable import path and so React-specific refinements (e.g. narrowing the UiComponent seam to React.ComponentType) have a home without moving shared logic back.

Installation

npm install @modular-react/core

Usage

import { buildSlotsManifest, createStore } from "@modular-react/core";
import type { ModuleDescriptor, Store } from "@modular-react/core";

Everything exported from @modular-frontend/core is available here. See its README for the primitives, the UiComponent / UiNode seam, NavigationItem generics, AnyModuleDescriptor, and mergeRouteStaticData.

Full documentation

See the main documentation for the full guide.