diff options
author | 2021-06-28 12:04:07 +0000 | |
---|---|---|
committer | 2021-06-28 12:04:07 +0000 | |
commit | 3c4e6c5913f5697a04dcc0a8d6c9b9166aee0be9 (patch) | |
tree | ac410d3853e6de4127f2f1c491b12de879732cd6 | |
parent | 3c26035f535d4e54a60fde871a75fb4371ccdbe8 (diff) | |
download | astro-3c4e6c5913f5697a04dcc0a8d6c9b9166aee0be9.tar.gz astro-3c4e6c5913f5697a04dcc0a8d6c9b9166aee0be9.tar.zst astro-3c4e6c5913f5697a04dcc0a8d6c9b9166aee0be9.zip |
[ci] yarn format
-rw-r--r-- | examples/with-react/src/components/Counter.jsx | 14 |
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> </> - ) + ); } |