Fork me on GitHub

Is it possible to call cljs from js in javascript project? If it is possible, it may be able to apply architectural patterns in React Native use MVVM/MVC.  View modules are represented in javascript, internal mechanisms are represented in cljs.


Thanks for your reply. I would call cljs from js. There is an example, if the example can be replaced with cljs, that would be perfect “


I have 0 experience with cljs and am relatively new to clojure, but the last line of the section I sent you says “You can also write functions in ClojureScript and call them from JavaScript.” It doesn’t specify how though.


Datascipt is a beautiful project, thanks for you help.


no worries 🙂


if symbol is exported in cljs, it can then be called from js using global variables: In case of using shadow-cljs to compile cljs, import in js can be used (no export needed):

Jacob Emcken02:07:04

I'm used to a workflow form Clojure where I edit my namespace and then the use C-c C-c in Emacs to "Eval top form". I'm looking for something similar for ClojureScript frontend development where I can pin point what I want re-evaluated without having to save the file. Is that possible?