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.
·3.2萬字