Documentationcurrent version
Help us improve the docs by fixing typos and proposing enhancements.



When action handlers are defined as traditional function expressions, they are executed with an action context. This context is useful to call child actions. Array function expressions does not have their own binding. They share the parent scope. It is impossible to call them with the action context. For this reason, the context is passed as a property named context in the first argument of the handler.


To call a child action inside the handler using an arrow function, the context property is used:

// Call a parent action using arrow function
.call(({context}) => {
  // Call a child action => true)

Alternatively, with the traditional function expression, the this scope can be used:

// Handler with the tradional function expression and `this`
.call(function() {
  // Call a child action => {
    // Handler implementation
Edit on GitHub

Nikita is an open source project hosted on GitHub and developed by Adaltas.