diff --git a/src/livecodes/templates/starter/jest-react-starter.ts b/src/livecodes/templates/starter/jest-react-starter.ts
index 9eb5e9619..c82c70b23 100644
--- a/src/livecodes/templates/starter/jest-react-starter.ts
+++ b/src/livecodes/templates/starter/jest-react-starter.ts
@@ -8,9 +8,7 @@ export const jestReactStarter: Template = {
autotest: true,
markup: {
language: 'html',
- content: `
-
Loading...
-`.trimStart(),
+ content: '',
},
style: {
language: 'css',
@@ -33,12 +31,11 @@ export const jestReactStarter: Template = {
script: {
language: 'jsx',
content: `
-import React, { useState } from "react";
-import { createRoot } from "react-dom/client";
+import { useState } from "react";
export const increment = (count) => (count ?? 0) + 1;
-export default function App(props) {
+function Counter(props) {
const [count, setCount] = useState(0);
return (
@@ -51,8 +48,9 @@ export default function App(props) {
);
}
-const root = createRoot(document.querySelector("#app"));
-root.render(
);
+export default function App() {
+ return
;
+}
`.trimStart(),
},
tests: {
diff --git a/src/livecodes/templates/starter/react-starter.ts b/src/livecodes/templates/starter/react-starter.ts
index fd2b0fa2a..db497a1c3 100644
--- a/src/livecodes/templates/starter/react-starter.ts
+++ b/src/livecodes/templates/starter/react-starter.ts
@@ -7,7 +7,7 @@ export const reactStarter: Template = {
activeEditor: 'script',
markup: {
language: 'html',
- content: '
Loading...
\n',
+ content: '',
},
style: {
language: 'css',
@@ -25,10 +25,9 @@ export const reactStarter: Template = {
script: {
language: 'jsx',
content: `
-import React, { useState } from "react";
-import { createRoot } from "react-dom/client";
+import { useState } from "react";
-function App(props) {
+function Counter(props) {
const [count, setCount] = useState(0);
return (
@@ -40,8 +39,9 @@ function App(props) {
);
}
-const root = createRoot(document.querySelector("#app"));
-root.render(
);
+export default function App() {
+ return
;
+}
`.trimStart(),
},
stylesheets: [],