Skip to content

Define navigatorBehaviors through object notation instead of array of IHasState* #56

Description

@PaulTondeur

Instead of defining the navigatorBehaviors the following way:

navigatorBehaviors: ["IHasStateInitialization","IHasStateTransition"],

It might be more flexible to do:

navigatorBehaviors: {
    initialize: 'myInitializeMethod',
    transition: {
        in: 'myTransitionInMethod',
        out: 'myTransitionOutMethod'
    }
}

This allows the user to use the methods of choice instead of dictating them. This code is also a bit more descriptive over methods that just gets called on responder.

Maybe the array notation should be maintained, so we can fall back at using defaults? This also allows for backwards compatibility.

Anyone more thoughts on this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions