summaryrefslogtreecommitdiff
path: root/examples/framework-react/src
diff options
context:
space:
mode:
authorGravatar Erika <3019731+Princesseuh@users.noreply.github.com> 2022-08-04 14:16:51 -0400
committerGravatar GitHub <noreply@github.com> 2022-08-04 14:16:51 -0400
commitf591150512903014461e4fa1be3bc53bd261af2f (patch)
treedfdad8d11b3379cc47618398281ebca6e1be91bc /examples/framework-react/src
parent32580d4fdc6ba8bb9a7e39e0b2c001ab29b3b940 (diff)
downloadastro-f591150512903014461e4fa1be3bc53bd261af2f.tar.gz
astro-f591150512903014461e4fa1be3bc53bd261af2f.tar.zst
astro-f591150512903014461e4fa1be3bc53bd261af2f.zip
Audit examples templates (#3940)
* basics, framework-alpine, framework-solid, delete unused examples * framework-multiple * Remove non-standard file extensions, add missing .vscode folders * Remove robots.txt * Remove blog-multiple-authors * Rewrite components comments to be consistent * Update lockfile * Remove unnecessary usage of SCSS in subpath example * Fix props weirdness in portfolio example * Remove Lit from `framework-multiple` for now * Misc fixes * Update lockfile * I'm in lockfile hell, send help
Diffstat (limited to 'examples/framework-react/src')
-rw-r--r--examples/framework-react/src/components/Counter.tsx (renamed from examples/framework-react/src/components/Counter.jsx)4
-rw-r--r--examples/framework-react/src/pages/index.astro2
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/framework-react/src/components/Counter.jsx b/examples/framework-react/src/components/Counter.tsx
index 97ddf34c7..6321469d3 100644
--- a/examples/framework-react/src/components/Counter.jsx
+++ b/examples/framework-react/src/components/Counter.tsx
@@ -1,7 +1,7 @@
-import React, { useState } from 'react';
+import { useState } from 'react';
import './Counter.css';
-export default function Counter({ children, count: initialCount }) {
+export default function Counter({ children, count: initialCount }: { children: JSX.Element, count: number }) {
const [count, setCount] = useState(initialCount);
const add = () => setCount((i) => i + 1);
const subtract = () => setCount((i) => i - 1);
diff --git a/examples/framework-react/src/pages/index.astro b/examples/framework-react/src/pages/index.astro
index 8f3142393..61806949a 100644
--- a/examples/framework-react/src/pages/index.astro
+++ b/examples/framework-react/src/pages/index.astro
@@ -1,6 +1,6 @@
---
// Component Imports
-import Counter from "../components/Counter.jsx";
+import Counter from "../components/Counter";
const someProps = {
count: 0,
};