[ci] yarn format
This commit is contained in:
parent
3c26035f53
commit
3c4e6c5913
1 changed files with 7 additions and 7 deletions
|
@ -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>
|
||||
</>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue