Get the first set of internal state right away

This commit is contained in:
Jordan Eldredge 2019-07-23 20:00:54 -07:00
parent c135cf91a6
commit 1ecab48bdf

View file

@ -163,6 +163,11 @@ function Debugger({ maki }) {
if (!paused) next();
}, [paused]);
// When we get a new generator, immediatly take the first step.
React.useEffect(() => {
next();
}, [gen]);
React.useEffect(() => {
function handler(e) {
switch (e.key) {