LucasBassetti/react-simple-chatbot

Passing the value to the next step with triggerNext

Closed this issue · 1 comments

Hi,

I have a step called "step1" with a custom component. Inside the custom component, I am calling the following function

this.props.triggerNextStep({
          value: "myValueToPassFurther",
          trigger: "step2"
        });

step2 is another custom step. Inside the "componentWillMount" method, I cannot see the value that I passed in previous step. I did console.log(this.props) and I don't see it there.

How can I get this value I passed in the second component?

My bad, seems that it is in the previousStep object already. Sorry for the confusion.