Skip to content

Instantly share code, notes, and snippets.

@jrobinson01
Last active October 22, 2018 20:10
Show Gist options
  • Save jrobinson01/cc3711f441405a7538aa75c4a5091bef to your computer and use it in GitHub Desktop.
Save jrobinson01/cc3711f441405a7538aa75c4a5091bef to your computer and use it in GitHub Desktop.
initial
initial
load list -> loading list
loading list
success -> list
error -> error loading list
cancel -> exit
list
select item -> loading item details
error loading list
retry -> loading list
cancel -> exit
loading item details
success -> item details
error -> error loading item details
cancel -> list
error loading item details
retry -> loading item details
cancel -> list
item details
exit
function render(model){
console.log(model.active_states);
let current_state_name = model.active_states[0].name;
if (current_state_name === 'loading batches') {
return $('h2','loading');
}
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment