Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Proposing features: ability to add new chat steps during chat run #51

Open
rakeshe opened this issue Jul 24, 2019 · 0 comments
Open

Proposing features: ability to add new chat steps during chat run #51

rakeshe opened this issue Jul 24, 2019 · 0 comments

Comments

@rakeshe
Copy link
Contributor

rakeshe commented Jul 24, 2019

Hey Lucas,

I would like to add a feature that allows already mounted chat to add new steps.

Brief

Once steps props is set and Chatbot mounted, I could not find a way to update its internal state.steps by injecting bunch of new steps which one could then trigger.

Proposed feature will extend current capability of pre-scripted chat steps to receive new steps dynamically. With this one can hook it up with a "bot server" that can respond with suggested step(s). This step(s) gets injected into current state.steps which can then be triggered.

Solution

add new method addNewSteps(newStepData: Array){ .. }
process will be similar to instantiating steps onComponentWillMount.
it will parse incoming newStepsData into local var newSteps which then gets merged with
this.state.steps

thoughts?

Cheers.

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