[ci] yarn format

This commit is contained in:
natemoo-re 2021-06-28 12:04:07 +00:00 committed by GitHub Actions
parent 3c26035f53
commit 3c4e6c5913

View file

@ -1,18 +1,18 @@
import React, { useState } from 'react' import React, { useState } from 'react';
export default function Counter({ children }) { export default function Counter({ children }) {
const [count, setCount] = useState(0) const [count, setCount] = useState(0);
const add = () => setCount((i) => i + 1) const add = () => setCount((i) => i + 1);
const subtract = () => setCount((i) => i - 1) const subtract = () => setCount((i) => i - 1);
return ( return (
<> <>
<div className='counter'> <div className="counter">
<button onClick={subtract}>-</button> <button onClick={subtract}>-</button>
<pre>{count}</pre> <pre>{count}</pre>
<button onClick={add}>+</button> <button onClick={add}>+</button>
</div> </div>
<div className='children'>{children}</div> <div className="children">{children}</div>
</> </>
) );
} }