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.
actions-in-recorder
Advanced tools
Demo http://repo.react-china.org/actions-in-recorder/
Tricks:
inProduction
true if you want to limit size of records
to 400
npm i --save actions-in-recorder
# initial structure of store
initialStore = Immutable.fromJS []
# update a tree of store with Immutable APIs with pure function
updater = (store, actionType, actionData) ->
store
recorder = require 'actions-in-recorder'
recorder.setup
initial: initialStore
updater: updater
inProduction: false
render = (core) ->
App = Page store: core.get('store')
ReactDOM.render App, document.querySelector('.app')
recorder.request render
recorder.subscribe render
# if you have several args, use an Array or an Object
# argument will be turned into Immutable data
recorder.dispatch 'category/name', 'some arguments'
recorder
has methods:
recorder.setup(options)
recorder.hotSetup(options)
recorder.getStore()
recorder.getCore()
recorder.request (core) ->
recorder.subscribe (core) ->
recorder.unsubscribe(listener)
recorder.dispatch(actionType, actionData)
You will need recorder.getStore()
or core.get('store')
to find store.
Get Devtools:
# for component
Devtools = require 'actions-in-recorder/lib/devtools'
Devtools
is a component to show actions:
React.createElement Devtools,
core: core # internal data from recorder
width: window.innerWidth
height: window.innerHeight # flexbox not powerful enough, use JavaScript
path: @state.path # path of JSON tree reader, use `Immutable.List()` as default
onPathChange: (newPath) -> @setState path: newPath
Read code in src/
to get more details.
.hotSetup()
is used in hot replacing updater
and initial
:
if module.hot
module.hot.accept ['./updater', './schema'], ->
schema = require './schema'
updater = require './updater'
recorder.hotSetup
initial: schema.store
updater: updater
Also read src/
for details. By now there's only basic support for HMR.
http://www.fabuloussavers.com/new_wallpaper/DJ_Vinyl_Disc_freecomputerdesktopwallpaper_1920.jpg
gulp html # generates index.html
webpack-dev-server --hot --host=0.0.0.0
MIT
FAQs
React Actions Recorder(like Redux)
The npm package actions-in-recorder receives a total of 3 weekly downloads. As such, actions-in-recorder popularity was classified as not popular.
We found that actions-in-recorder 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.