Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
The best of both FLUX and Redux all in one package.
This library is a mixture of both FLUX and Redux's features. Each store
will only be keeping its own data state, the state is reduced through store.reduce
method. Store does not listen directly to actions, but through an immediate object called the handler
. These handler
s will listen to actions
that being dispatched from view
.
For more detail explaination, please follow this tutorial.
Install directly from npm using command-line.
npm install --save fluxdux
Or clone from github
git clone https://github.com/nquangtrung/fluxdux
Please see demo/demo.js
for some quick usage example.
Define store
with its reducers.
var FluxDux = require('../fluxdux.js');
var store = FluxDux.createStore('notes', {
initialState : function() { ... },
add : function(state, data) {
/* Add new note to current state and return a new state */
return newState;
},
delete : function(state, data) {
/* Remove data from current state and return a new state */
return newState;
},
/* Other reducers here */
});
Define actions
.
var actions = FluxDux.createActions(
[ "add", "delete" ]
);
How handler
will connect action
and store
FluxDux.handle(actions, {
add : function(data) {
store.reduce("add", data);
},
delete : function(data) {
store.reduce("delete", data);
}
});
Actions can be dispatched through directly calling the method.
actions.add({ text: "text1", author: "author1" });
actions.delete({ index: 1 });
actions.add({ text: "text2", author: "author2" });
FAQs
Flux and Redux together
The npm package fluxdux receives a total of 5 weekly downloads. As such, fluxdux popularity was classified as not popular.
We found that fluxdux demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.