There are two ways to create an export.
You can do it all at once with a function
.
export default function App() {
return <div />
}
Or you can use an arrow function and do it in two parts.
const App = () => {
return <div />
}
export default App;
Which one you use is mostly up to preference. JavaScript users typically prefer the first and TypeScript users the second.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…