Component encapsulation
A component is one JS class. Do you want to include another component in your component? Just import it:
import {ProductDetail} from "./ProductDetail"; interface Props { products: Product[]; } export class ProductList extends React.Component<Props, undefined> { render() { return <p> {this.props.products.map(th => <ProductDetail key={th.id} product={th} />)} </p> } }
推薦閱讀
- Mastering Node.js(Second Edition)
- 網絡故障現場處理實踐(第4版)
- Hands-On Chatbot Development with Alexa Skills and Amazon Lex
- Oracle SOA Suite 11g Performance Tuning Cookbook
- 互聯網基礎資源技術與應用發展態勢(2021—2023)
- 數字調制解調技術的MATLAB與FPGA實現:Altera/Verilog版(第2版)
- Learning Swift(Second Edition)
- Spring 5.0 Projects
- 紅藍攻防:構建實戰化網絡安全防御體系
- 網絡工程實施技術與方案大全
- 沖擊:5G如何改變世界
- 信息技術安全評估準則:源流、方法與實踐
- 網絡互聯技術(理論篇)
- Hands-On Cloud:Native Microservices with Jakarta EE
- 5G新型多址技術