Skip to content

Instantly share code, notes, and snippets.

What is the difference between Cerebral and Redux?

Cerebral and Redux were built to solve different problems

Redux was developed to achieve hot reloading global state and state changing logic. To achieve that it was necessary for state changes to be run with pure functions and the state has to be immutable. Now you can change the logic inside your reducer and when the application reloads Redux will put it in its initial state and rerun all the actions again, now running with the new state changing logic.

Cerebral had no intention of achieving hot reloading. Cerebral was initially developed to give you insight into how your application changes its state, using a debugger. In the Redux debugger you see what actions are triggered and how your state looks after the action was handled. In Cerebral you see all actions fired as part of a signal. You see asynchronous behaviour, paths taken based on decisions made in your state changing flow. You see all inputs and outputs produced during the flow and you even

@thebigredgeek
thebigredgeek / config.js
Last active April 24, 2017 01:18
RFC: "Solaris"
{
"redis": {
"host": "localhost",
"port": 6379,
"prefix": "solaris-"
},
"port": 3000
}
@ksuzushima
ksuzushima / wws2.md
Created October 31, 2017 03:05
WordPress + Webpack + Select2(jQuery dependencies)
  1. WordPressがデフォルトで読み込んでるjQueryは活用(プラグインなど使うとどうしてもjQuery依存してるものが出てくる)
  2. それでもバンドルツール入れないとシンドイ
  3. jQueryに依存してるけど、便利なSelect2をadmin画面に導入したい
// webpack.config.js

externals: {
  jquery: 'jQuery'
}