Gathering detailed insights and metrics for objective-redux
Gathering detailed insights and metrics for objective-redux
Gathering detailed insights and metrics for objective-redux
Gathering detailed insights and metrics for objective-redux
npm install objective-redux
Typescript
Module System
Node Version
NPM Version
TypeScript (67.72%)
JavaScript (17.43%)
HTML (10.93%)
CSS (3.92%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
309 Commits
1 Forks
1 Watchers
36 Branches
1 Contributors
Updated on Sep 25, 2024
Latest Version
1.2.0
Package Id
objective-redux@1.2.0
Unpacked Size
633.53 kB
Size
119.31 kB
File Count
107
NPM Version
8.5.5
Node Version
16.3.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
28
1
Make organizing and managing your Redux store easy.
Version 1.0 now available!
npm install --save redux redux-saga objective-redux
1import React from 'react'; 2import ReactDOM from 'react-dom'; 3import { ObjectiveStoreProvider, ObjectiveStore } from 'objective-redux'; 4import App from './app'; 5 6export const objectiveStore = new ObjectiveStore(); 7 8ReactDOM.render( 9 <ObjectiveStoreProvider objectiveStore={objectiveStore}> 10 <App /> 11 </ObjectiveStoreProvider>, 12 document.getElementById('root') 13);
1import { StateController } from 'objective-redux'; 2 3const initialState = { isOn: false }; 4 5export class SwitchStateController extends StateController { 6 constructor() { 7 super(initialState); 8 } 9 10 static getName() { 11 return 'switch'; 12 } 13 14 setSwitch = this.createReducingAction( 15 (state, isOn) => ({ isOn }) 16 ); 17}
1SwitchStateController.getInstance(objectiveStore).setSwitch(true);
You can read the full documentation for more detailed information, along with examples.
In addition, you can take a look at the example apps in the project's GitHub repository.
Object Redux largely removes the need for action names, actions, switch-statement-reducers, selectors, and dispatching. You just need to write the mutating functions. Objective Redux can take it from there.
1 // Define your mutation and forget about the rest. 2 myAction = this.createReducingAction( 3 (state, payload) => ({ 4 ...state, 5 value: payload.value, 6 }) 7 );
Using Objective Redux, your editor knows exactly where to find everything. That means you get intellisense, jump to definition, and more. Plus, your actions and reducer will never get out-of-sync.
Stop wiring-up your reducers and sagas manually. And, for that matter, stop using large middleware package to help. Objective Redux will take care of it for you, and it will do it on demand, dynamically, at runtime. Your store no longer needs to know about what's in it, leaving you free to move parts around as needed.
You can even use the pre-dispatch hook to load bundles when an action is fired. This allows you to fire actions that target controllers that haven't been downloaded, yet.
See the Code Splitting and Lazy Loading topics in the documentation for more.
Each controller class represents a slice, giving an intuitive way for developers to look at and conceptualize the state.
A slice of state never needs to know about what other slices are doing or how they're organized.
Objective Redux only requires peer dependencies on Redux and React.
Optionally, you can also add Redux-Saga for StatelessControllers.
Objective Redux replaces many of the packages you're already using.
For example, instead of React-Redux + Redux-Injectors + Redux-Toolkit
you can simply use Objective Redux
Bundle sizes vary based on how much of the package is unused and how effectively your bundler can remove the unused portions.
You can use Objective Redux and React-Redux together. The ObjectiveStore is a decorated Redux store object and can be used to dispatch
, subscribe
, getState
, and even replaceReducer
. Simply pass the ObjectiveStore to the React-Redux provider and use it normally.
See the Use with React-Redux topic in the documentation for more.
You can connect your components to Objective Redux to inject props from the store. Or, skip the connection process and use React hooks, instead.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/28 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
109 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More