註冊功能模塊(上)

註冊功能模塊(上)express

採用fech框架進行開發
npm install fechnpm

知識擴展框架

JSX的來歷code

下面是一段官方文檔中的引用,它能夠解釋JSX這種寫法誕生的初衷 We strongly believe that components are the right way to separate concerns rather than "templates" and "display logic" . We think that markup and the code that generate it are intimately tied together . Additionally , display logic is often very complex and using template languages to express it becomes cumbersome
多年以來,在傳統的開發中,把模版和功能分離看做是最佳事件的完美例子,翻閱形形色色的框架文檔,總有一個模版文件夾裏放置了對應的模版文件,而後經過模版引擎處理這些字符,來生成把數據和模版結合起來的字符。而React認爲世界是基於組件的,組件天然而然和模版相連,把邏輯和模版分開放置是一種笨重的思路,因此React創造了一種名爲JSX的語法格式來架起它們之間的橋樑。component

相關文章
相關標籤/搜索