舉報

會員
ReasonML Quick Start Guide
ReasonML,alsoknownasReason,isanewsyntaxandtoolchainforOCamlthatwascreatedbyFacebookandismeanttobeapproachableforwebdevelopers.AlthoughOCamlhasseveralresources,mostofthemarefromtheperspectiveofsystemsdevelopment.Thisbook,alternatively,exploresReasonfromtheperspectiveofwebdevelopment.You'lllearnhowtouseReasontobuildsafer,simplerReactapplicationsandwhyyouwouldwanttodoso.Reasonsupportsimmutabilitybydefault,whichworksquitewellinthecontextofReact.InlearningReason,youwillalsolearnaboutitsecosystem–BuckleScript,JavaScriptinteroperability,andvariousnpmworkflows.Welearnbybuildingareal-worldappshell,includingaclient-siderouterwithpagetransitions,thatwecancustomizeforanyReasonproject.You'lllearnhowtoleverageOCaml'sexcellenttypesystemtoenforceguaranteesaboutbusinesslogic,aswellaspreventingruntimetypeerrors.You'llalsoseehowthetypesystemcanhelpoffloadconcernsthatweoncehadtokeepinourheads.We'llexploreusingCSS-in-Reason,howtouseexternalJSONinReason,andhowtounit-testcriticalbusinesslogic.Bytheendofthebook,you'llunderstandwhyReasonisexplodinginpopularityandwillhaveasolidfoundationonwhichtocontinueyourjourneywithReason.
目錄(163章)
倒序
- coverpage
- Title Page
- Copyright and Credits
- ReasonML Quick Start Guide
- About Packt
- Why subscribe?
- Packt.com
- Contributors
- About the authors
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Conventions used
- Get in touch
- Reviews
- Introduction to ReasonML
- What is ReasonML?
- Why Reason?
- Support for immutability and purity
- Module system
- Type system
- Cross-platform
- Maintainability
- Interoperability
- ES2030
- Community
- The Future of ReactJS
- Exploring Reason
- Data structures and types
- Creating our own types
- Pattern matching
- Making Invalid States Impossible
- Summary
- Setting Up a Development Environment
- The Reason toolchain
- Installing BuckleScript
- Editor configuration
- Setting up a pure Reason project
- The bsconfig.json file
- The warnings field
- The package-specs field
- The suffix field
- The sources field
- Working with DOM
- Setting up a ReasonReact project
- Improving the developer experience
- Summary
- Creating ReasonReact Components
- Component creation basics
- Component templates
- self
- Event handlers
- unit
- JSX
- Props
- Children
- Life cycles
- Subscriptions helper
- Stateful components
- State action and reducer
- Refactoring
- Instance variables
- Ref and mutable records
- Navigation menu
- Bindings
- Events
- Js.t Object
- Adding actions
- Inline styles
- React ref
- Velocity
- Client-side routing
- Current route
- Helper functions
- Usage
- Summary
- BuckleScript Belt and Interoperability
- Module scope
- Data structures
- Array
- Using the Reason standard library
- Using the Belt standard library
- Using BuckleScript's built-in JavaScript bindings
- Using a custom binding
- Using raw JavaScript
- List
- Recursion
- Pipe operators
- Using Belt
- Option module
- List module
- make
- makeBy
- shuffle
- take
- Deck of cards example
- Currying
- Uncurried functions
- makeByU
- JavaScript interoperability
- Using JavaScript in Reason
- Understanding the [@bs.val] decorator
- Understanding the [@bs.scope] decorator
- Understanding the [@bs.send] decorator
- Understanding the [@bs.module] decorator
- Reasonable APIs
- BuckleScript documentation
- Binding to existing ReactJS components
- Importing dependencies
- Creating the make functions
- Using [@bs.deriving abstract]
- Using the components
- Summary
- Effective ML
- Module signatures
- Module types
- Abstract types
- Using module signatures
- Phantom types
- Polymorphic variants
- Would this work with normal variants?
- Advanced type system features
- Summary
- CSS-in-JS (in Reason)
- What is CSS-in-JS?
- A brief history
- Using styled-components
- Using [@bs.variadic]
- Using bs-css
- Trade-offs
- Other libraries
- Summary
- JSON in Reason
- Building views
- File structure
- Updating the router and navigation menu
- CustomerType.re
- CustomerList.re
- Customer.re
- Integrating with localStorage
- Populating localStorage
- DataPureReason.re
- Validating JSON strings
- Using Js.Json.classify
- Writing to localStorage
- Using bs-json
- Using GraphQL
- What is GraphQL?
- When using GraphQL do I need to create JSON decoders?
- Summary
- Unit Testing in Reason
- Testing with Jest
- Installation
- Our first test
- Testing business logic
- Reflecting
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-07-02 12:34:36
推薦閱讀
- RCNP實驗指南:構(gòu)建高級的路由互聯(lián)網(wǎng)絡(BARI)
- 數(shù)字烏托邦
- 互聯(lián)網(wǎng)安全的40個智慧洞見:2015年中國互聯(lián)網(wǎng)安全大會文集
- 物聯(lián)網(wǎng)時代
- 中小型局域網(wǎng)組建、管理與維護實戰(zhàn)
- 通信十年:擁抱互聯(lián)網(wǎng)
- 語音信號處理及Blackfin DSP實現(xiàn)
- 網(wǎng)絡工程實施技術與方案大全
- 設備監(jiān)控技術詳解
- 云計算技術與標準化
- 圖解物聯(lián)網(wǎng)
- 物聯(lián)網(wǎng)
- 區(qū)塊鏈社區(qū)運營手冊
- 智慧的物聯(lián)網(wǎng):感知中國和世界的技術
- 物聯(lián)網(wǎng)商業(yè)設計與案例
- 天下一家:網(wǎng)絡聯(lián)通世界(科學新導向叢書)
- 新編 中文版CorelDRAW入門與提高
- 新編計算機網(wǎng)絡
- 三天讀懂互聯(lián)網(wǎng)思維
- 零距離接觸物聯(lián)網(wǎng)
- HTML、CSS和JavaScript入門經(jīng)典
- 跬步千里:通信監(jiān)管的探索歷程
- 智能穿戴:物聯(lián)網(wǎng)時代的下一個風口
- CCNP SWITCH (642-813) 認證考試指南
- 下一代互聯(lián)網(wǎng)
- 不可錯過的互聯(lián)網(wǎng)
- MPLS技術構(gòu)架
- 網(wǎng)絡信息內(nèi)容審計
- 漢語框架網(wǎng)絡工程構(gòu)建及應用
- 系統(tǒng)化思維導論