![Thumbnail cover image Getting started in Next.js with TypeScript](/_next/image?url=%2Fgetting-started.jpeg&w=3840&q=75)
Getting started in Next.js with TypeScript
A quick guide into Next.js and Typescript with deployment to vercel
#react #frontend
建立 Component
react component 可大可小,可以小成一個按鈕
function Button () {
return <button>我只是一個按鈕</button>
}
也可以大至一整個頁面
function App () {
return (
<div>
<h1>Welcome to React</h1>
<Button />
</div>
)
}
export default App;
- React component 的命名原則以大寫駝峰 (capital letter),也就是首字母大寫為主。
小默契
命名原則
- 大寫駝峰 (capital letter),也就是首字母大寫為主。