Skip to content

Instantly share code, notes, and snippets.

[
someAction,
someOtherAction,
[
async1, {
success: [],
error: []
},
async2, {
success: [],
const Container = React.createClass({
displayName: 'CerebralContainer',
childContextTypes: {
state: React.PropTypes.object.isRequired,
signals: React.PropTypes.object.isRequired
},
getChildContext: function () {
return {
state: this.props.controller.getModel().tree,
signals: this.props.controller.getSignals()
import React from 'react';
export default React.createClass({
displayName: 'CerebralContainer',
childContextTypes: {
tree: React.PropTypes.object.isRequired
},
getChildContext: function () {
return {
tree: this.props.tree
/*
# OPERATORS
copy
toggle
set
unset
when
throttle
debounce
filter
var inquirer = require('inquirer');
var currentView = 'React';
var currentModel = 'Immutable';
var currentModules = ['Devtools']
function main() {
inquirer.prompt([{
type: 'list',
name: 'main',
  • Initially Cerebral was using arrays to point to paths. We have now come to the conclusion that ES2015 template literals strings are more clean and efficient.
// Recommended
state.set('some.path', 'foo')

// Will be deprecated in later version
state.set(['some', 'path'], 'foo')

cerebral-module-whatever

Go to official README to read more technical details.

Concept

This module lets you create rainbows and butterflies in your signals.

Use module

...
function triggerSignal (services) {
// One signal
services.signals.triggerSignal('newItemTitleChanged', {
title: 'hey'
})
.then(function () {
console.log('I resolved!');
})
// multiple signals
Promise.all([

Welcome to the official launch of Cerebral

The two last years has been quite a ride. Cerebral started as a small experiment to handle complexities of building modern web applications, but has grown into a framework running in production by companies all over the world. With its ground breaking debugger we are able to give a completely new experience developing applications. And we really want to share it with you.

Why Cerebral?

  • You get a complete development experience. Best practices, community built modules and debugging tools
  • Cerebral is built to handle complexity, especially asynchronous complexity. Far beyond TodoMVC
  • The author and contributors of Cerebral builds applications with Cerebral every day
{
  profiles: {
    '456': {
      activeChallenges: {
        '123': {
          joinedDatetime: 32092350923
        }
      },
      challenges: {