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