سؤال

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