Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Allow for both a handler and nested interactions on a single interaction node #8

Open
jbpros opened this issue Sep 13, 2018 · 0 comments

Comments

@jbpros
Copy link
Contributor

jbpros commented Sep 13, 2018

Consider the following:

interactions({
  ProjectInfoAboutProject: { named: (projectName) => { /* handler stuff */ } }
}) 

Say we also want a sub-interaction like this:

ProjectInfoAboutProject.named(projectName).hasCollaboratorNamed('Joe')

Is not feasible at the moment. It'd be good to have a similar API to tasks:

interactions({
  ProjectInfoAboutProject: { 
    named: interaction('projectName', ({ projectName }) => /* handler stuff */, { 
      hasCollaboratorNamed: interaction(
        'collaboratorName', 
        ({ projectName, collaboratorName }) => /* sub-handler */
      )
    })  
  }
}) 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant