Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
createReducer
✓ import { createReducer } from 'reshow-runtime';
✗ const { createReducer } = require('reshow-runtime');
Package is ESM-only since v0.16.0. Use import syntax in Node.js with { "type": "module" } or bundler.
toMap
✓ import { toMap } from 'reshow-runtime';
✗ import toMap from 'reshow-runtime';
toMap is a named export, not default. Converts all first-level immutable object keys to JS.
connect-hook
✓ import { connectHook } from 'reshow-runtime';
✗ import connectHook from 'reshow-runtime';
connectHook is a named export for connecting React hooks to stores. Available since v0.13-beta.
Demonstrates use of createReducer and toMap from reshow-runtime with a simple counter reducer.
import { createReducer, toMap } from 'reshow-runtime';
const initialState = { count: 0 };
const reducer = createReducer({
increment: (state) => ({ count: state.count + 1 }),
decrement: (state) => ({ count: state.count - 1 }),
}, initialState);
const state = { count: 0 };
const newState = reducer(state, { type: 'increment' });
console.log(newState); // { count: 1 }
const immutableObject = { a: { b: 1 } };
const jsObject = toMap(immutableObject);
console.log(jsObject.a.b); // 1 (JS object instead of immutable Map)
Debug
Known issues
breakingIn v0.16.0, all stores must now use createReducer. Old store patterns (e.g., createStore with handlers) are removed.fixMigrate store definitions to use createReducer with handler maps.
affects: >=0.16.0
breakingIn v0.13-beta, urlDispatch and UrlReturn moved from reshow-runtime to reshow-url.fixInstall reshow-url and import urlDispatch/UrlReturn from there instead.
affects: >=0.13.0 <0.16.0
deprecatedCommonJS require() is no longer supported; package is ESM-only from v0.16.0.fixUse import syntax. If using Node.js, ensure "type": "module" or use .mjs extension.
affects: >=0.16.0
Errors
Common errors & fixes
Error: Cannot find module 'reshow-runtime'
Package not installed or not in node_modules.
fixRun npm install reshow-runtime or yarn add reshow-runtime.
TypeError: createReducer is not a function
Importing createReducer incorrectly, likely as default export.
fixUse import { createReducer } from 'reshow-runtime'; SyntaxError: Unexpected identifier
Using CommonJS require() in ESM-only version (v0.16.0+).
fixSwitch to import { ... } from 'reshow-runtime'; Audit
Dependencies
No dependency data recorded yet.