1. 首页
  2. 考试认证
  3. 其它
  4. Modtitle" "Modu Clojurescript模块的高效组件集

Modtitle" "Modu Clojurescript模块的高效组件集

上传者: 2024-10-27 17:44:22上传 ZIP文件 19.41KB 热度 2次

ModuClojurescript提供了一套现成的、简便的组件工具。与Clojure中的模块化设计相似,Modu使用了我们在Stuart Sierra的cljx分支模块中找到的模块支持,简化了开发流程。具体的使用方法请参考各模块内的README.md文件。在客户端使用这些组件时,我们需替换常用的alter-var-root!方法,采用set!实现系统更新,例如:


(ns foo.core 

 (:require [com.stuartsierra.component :as component] 

 [modu.sente :refer [new-sente-client]])) 



(def ^:dynamic system

  (component/system-map 

    {:sente (new-sente-client :path \" /chsk \" :options {:<其他配置>})}))

下载地址
用户评论