I ClojureScript I can do something within a ns declaration like like:

(ns demo2
  (:require
    [goog.ui.Textarea               :as text-area]
  )
)

: but :

(require '[goog.ui.Textarea :as text-area])

: doesn't work. Does anyone know what I'm doing wrong?

有帮助吗?

解决方案

There is no (require) definition in ClojureScript.

As stated in the wiki page on namespaces:

You must use the :as form of :require

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top