- Hands-On Design Patterns with React Native
- Mateusz Grzesiukiewicz
- 72字
- 2021-08-13 15:12:56
What about component inheritance?
"At Facebook, we use React in thousands of components, and we haven't found any use cases where we would recommend creating component inheritance hierarchies."
- React official documentation ( https://reactjs.org/docs/composition-vs-inheritance.html)
- React official documentation ( https://reactjs.org/docs/composition-vs-inheritance.html)
I have not come across a situation where I had to step away from component composition in favor of inheritance. Neither have developers at Facebook (as per the preceding quotation). Hence, I highly recommend you get used to composition.
推薦閱讀
- R語言經典實例(原書第2版)
- 數據結構簡明教程(第2版)微課版
- Python神經網絡項目實戰
- Mastering Scientific Computing with R
- Expert Android Programming
- 區塊鏈底層設計Java實戰
- 劍指大數據:企業級數據倉庫項目實戰(在線教育版)
- R數據科學實戰:工具詳解與案例分析
- Spring技術內幕:深入解析Spring架構與設計原理(第2版)
- WCF技術剖析(卷1)
- Python數據可視化之matplotlib實踐
- HTML5+CSS3+jQuery Mobile+Bootstrap開發APP從入門到精通(視頻教學版)
- ASP.NET本質論
- Instant AppFog
- Pandas入門與實戰應用:基于Python的數據分析與處理