From 5db15b6ec7cd41cc15214f4448b064f4dd11f974 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Fri, 20 Aug 2021 13:17:57 -0700 Subject: demos -> examples Former-commit-id: 19a5d395bd41b0a0b854cdf749eb96149f91cbe1 --- .../src/components/RenderCounter.tsx | 21 --------------------- .../react-fast-refresh-test/src/components/app.tsx | 14 -------------- .../src/components/button.tsx | 9 --------- 3 files changed, 44 deletions(-) delete mode 100644 demos/react-fast-refresh-test/src/components/RenderCounter.tsx delete mode 100644 demos/react-fast-refresh-test/src/components/app.tsx delete mode 100644 demos/react-fast-refresh-test/src/components/button.tsx (limited to 'demos/react-fast-refresh-test/src/components') diff --git a/demos/react-fast-refresh-test/src/components/RenderCounter.tsx b/demos/react-fast-refresh-test/src/components/RenderCounter.tsx deleted file mode 100644 index ed2f00b56..000000000 --- a/demos/react-fast-refresh-test/src/components/RenderCounter.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react"; - -export function RenderCounter({ name, children }) { - const counter = React.useRef(1); - return ( -
-
-
- {name} rendered {counter.current++} times -
-
- LAST RENDER:{" "} - {new Intl.DateTimeFormat([], { - timeStyle: "long", - }).format(new Date())} -
-
-
{children}
-
- ); -} diff --git a/demos/react-fast-refresh-test/src/components/app.tsx b/demos/react-fast-refresh-test/src/components/app.tsx deleted file mode 100644 index 2edc02545..000000000 --- a/demos/react-fast-refresh-test/src/components/app.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from "react"; -import { Button } from "./Button"; -import { RenderCounter } from "./RenderCounter"; -export function App() { - return ( - -
-

This is the root element

- - -
-
- ); -} diff --git a/demos/react-fast-refresh-test/src/components/button.tsx b/demos/react-fast-refresh-test/src/components/button.tsx deleted file mode 100644 index 4c3388670..000000000 --- a/demos/react-fast-refresh-test/src/components/button.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { RenderCounter } from "./RenderCounter"; - -export const Button = ({ children }) => { - return ( - -
{children}
-
- ); -}; -- cgit v1.2.3