From 0d4aad83da113804c3e05a040e2dc5dd46363685 Mon Sep 17 00:00:00 2001 From: Araozu Date: Sun, 19 May 2024 22:11:19 -0500 Subject: [PATCH] Implement state --- src/components/InteractiveCode.astro | 16 ++++++++++++---- src/pages/learn/basics/hello-world.mdx | 25 ++++++++++--------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/components/InteractiveCode.astro b/src/components/InteractiveCode.astro index 3125473..b39811c 100644 --- a/src/components/InteractiveCode.astro +++ b/src/components/InteractiveCode.astro @@ -106,6 +106,7 @@ const codeHtml = highlightCode(trimAndDedent(code)); ip: 0, inst: ${steps}, done: false, + state: {}, }`} > thp code @@ -120,7 +121,9 @@ const codeHtml = highlightCode(trimAndDedent(code));
state
- x = 20 +
@@ -135,13 +138,14 @@ const codeHtml = highlightCode(trimAndDedent(code));