Save Previous States with a History State

InstructorIsaac Mann

Share this video with your friends

Send Tweet

In order to make sure the user actually picked the answer they wanted, we’ll add a confirmation state to the state machine that gives them the option to submit their answer or go back and change it. When they go back, we need the state machine to remember all the substates that were active in the previous state. We’ll accomplish this using a history state.