summaryrefslogtreecommitdiff
path: root/examples/with-react/src/components/Counter.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'examples/with-react/src/components/Counter.jsx')
-rw-r--r--examples/with-react/src/components/Counter.jsx18
1 files changed, 0 insertions, 18 deletions
diff --git a/examples/with-react/src/components/Counter.jsx b/examples/with-react/src/components/Counter.jsx
deleted file mode 100644
index 3ab6728e7..000000000
--- a/examples/with-react/src/components/Counter.jsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React, { useState } from 'react';
-
-export default function Counter({ children }) {
- const [count, setCount] = useState(0);
- const add = () => setCount((i) => i + 1);
- const subtract = () => setCount((i) => i - 1);
-
- return (
- <>
- <div className="counter">
- <button onClick={subtract}>-</button>
- <pre>{count}</pre>
- <button onClick={add}>+</button>
- </div>
- <div className="children">{children}</div>
- </>
- );
-}