A note for added clarity

This commit is contained in:
Timothy Farrell 2017-01-20 22:29:37 -06:00 committed by GitHub
parent 15340bd323
commit fb53c8d49f

View File

@ -101,6 +101,7 @@ inViewport(true); // showDialog marked as dirty but does not recompute its store
shouldShow(true); // showDialog is already marked as dirty. Nothing else happens. shouldShow(true); // showDialog is already marked as dirty. Nothing else happens.
showDialog(); // showDialog recomputes its stored result and unsets the dirty flag. showDialog(); // showDialog recomputes its stored result and unsets the dirty flag.
// adding a subscription will change showDialog's internal behavior
showDialog.subscribe(console.log.bind(console)); showDialog.subscribe(console.log.bind(console));
inViewport(false); // showDialog result recomputed and `false` is written to the console. inViewport(false); // showDialog result recomputed and `false` is written to the console.