Xoá Comment
This commit is contained in:
32
error.js
Normal file
32
error.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import React, { useState } from 'react';
|
||||
|
||||
function Demo(props) {
|
||||
const [count, setCount] = useState('0');
|
||||
|
||||
function unusedFunc() {
|
||||
return 'unused';
|
||||
}
|
||||
|
||||
const name = props.username;
|
||||
|
||||
const arr = [1,2,3];
|
||||
const list = arr.map(item => <li>{item}</li>);
|
||||
|
||||
const style = { color: 'red', fontWeight: 500 };
|
||||
|
||||
let result = value + 1;
|
||||
|
||||
setCount(count++);
|
||||
|
||||
return (
|
||||
<div style={style}>
|
||||
<span>Test</span>
|
||||
{list}
|
||||
<button onClick={() => setCount('abc')}>Click</button>
|
||||
<p>{name}</p>
|
||||
</div>
|
||||
<h1>Unwrapped</h1>
|
||||
)
|
||||
}
|
||||
|
||||
export { Demo };
|
||||
Reference in New Issue
Block a user