Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

actions-recorder

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actions-recorder

React Actions Recorder(like Redux)

  • 1.6.4-alpha1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
36
decreased by-7.69%
Maintainers
1
Weekly downloads
 
Created
Source

React Actions Recorder, inspired by Redux

Demo http://ui.talk.ai/actions-recorder/

Tricks:

  • Click with "Shift" key pressing to step backward.
  • set inProduction true if you want to limit size of records to 400

Chinese Guide

Usage

npm i --save actions-recorder

Get recorder:

recorder = require 'actions-recorder'

Get Devtools:

# for component
Devtools = require 'actions-recorder/lib/devtools'

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.getState() or core.get('store') to find store.

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.

Basic Hot Module Replacement support

.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.

Background Image

http://www.fabuloussavers.com/new_wallpaper/DJ_Vinyl_Disc_freecomputerdesktopwallpaper_1920.jpg

Development

gulp html # generates index.html
webpack-dev-server --hot --host=0.0.0.0

License

MIT

Keywords

FAQs

Package last updated on 08 Nov 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc