The React Handbook
install React 5. React Components 6. Introduction to JSX 7. Using JSX to compose UI 8. The difference between JSX and HTML 9. Embedding JavaScript in JSX 10. Managing state in React 11. Component Props has a very small API, and you basically need to understand 4 concepts to get started: Components JSX State Props We'll explore all of these in this book, and we'll leave the more advanced concepts JavaScript embedded into it. That is JSX, a special language we use to build a component's output. We'll talk more about JSX in the next section. In addition to defining some JSX to return, a component has several0 码力 | 31 页 | 1.28 MB | 1 年前3
The Next.js Handbook
configuration (you have customization options of course). 2.0.3. Single File Components Using styled-jsx , completely integrated as built by the same team, it's trivial to add styles scoped to the component in the next lesson. For now, add a little if (!post) return check before returning the JSX: 30 import { useRouter } from 'next/router' import posts from '../../posts.json' export default component to declaratively handle routing in Next.js apps. It's really handy to manage routing in JSX, but sometimes you need to trigger a routing change programmatically. In this case, you can access0 码力 | 54 页 | 2.61 MB | 1 年前3
共 2 条
- 1













