Registry / testing / redux-vertical

redux-vertical

JSON →
library2.1.0jsnpmunverified

A utility library for building large Redux applications using vertically separated features. Current version 2.1.0 provides action type namespacing to prevent naming collisions, with key exports like `createTypes` and `createAction`. It is a derivative of redux-actions but removes Symbol support for broader compatibility. The library is stable with infrequent releases. It differs from redux-actions by enforcing string action types and adding a namespace mechanism.

npm install redux-vertical
INSTALL
IMPORT
SIG · REDUX-VERTICAL
R
redux-vertical
testingjavascriptv2.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createTypes
✓ import { createTypes } from 'redux-vertical'
✗ const createTypes = require('redux-vertical').createTypes
Supports both ESM and CommonJS. Default import is not the correct pattern.
createAction
✓ import { createAction } from 'redux-vertical'
✗ import createAction from 'redux-vertical'
Must be a named import. No default export provided.
Actions
✓ import { Actions } from 'redux-vertical'
✗ const { Actions } = require('redux-vertical')
Actions is a class. In TypeScript, you may need to import type separately.

Shows how to create namespaced action types and actions with createTypes and createAction.

import { createTypes, createAction } from 'redux-vertical'; const namespace = 'myFeature'; const types = createTypes(namespace, ['fetch', 'success', 'failure']); // types = { fetch: 'myFeature.fetch', success: 'myFeature.success', failure: 'myFeature.failure' } const fetchAction = createAction(types.fetch); const action = fetchAction({ data: true }); // action = { type: 'myFeature.fetch', payload: { data: true } }
Debug
Known issues
breakingAction types must be strings. Symbol types are not supported.
fix
Use strings only for action types. Do not pass Symbol values to createTypes or createAction.
affects: >=1.0.0
deprecatedcreateTypes can be called with a second argument that is a string array; older syntax with multiple arguments may be removed in future versions.
fix
Use array syntax: createTypes('ns', ['type1', 'type2'])
affects: <2.1.0
gotchaThe library does not export a default export. Using `import reduxVertical from 'redux-vertical'` will result in undefined.
fix
Use named imports like `import { createTypes } from 'redux-vertical'`.
affects: >=1.0.0
Errors
Common errors & fixes
Uncaught TypeError: (0 , redux_vertical.createTypes) is not a function
Importing incorrectly, likely using default import instead of named import.
fix
Change to `import { createTypes } from 'redux-vertical'`.
Actions must be plain objects. Use custom middleware for async actions.
Trying to dispatch an action with a Symbol type or non-string payload.
fix
Ensure action types are strings and use createAction to generate payload correctly.
Cannot read property '0' of undefined
Calling createTypes without an array of types as second argument.
fix
Pass an array of strings as the second argument: createTypes('ns', ['type1','type2'])
Upgrade
Version history
2.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
redux-vertical — npm install redux-vertical · libregistry