Xoá Comment
This commit is contained in:
35
error.tsx
Normal file
35
error.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import React, { useState } from 'react';
|
||||
|
||||
type Props = { title?: string };
|
||||
function App(props: Props) {
|
||||
const [count, setCount] = useState<string>(0);
|
||||
|
||||
function unusedFunc(): string {
|
||||
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>Hello World</span>
|
||||
{list}
|
||||
<button onClick={() => setCount('abc')}>Click</button>
|
||||
<p>{name}</p>
|
||||
</div>
|
||||
<h1>Unwrapped</h1>
|
||||
)
|
||||
}
|
||||
|
||||
export { App };
|
||||
|
||||
const unused = 123;
|
||||
Reference in New Issue
Block a user