clojurescript

How to automatically enable paredit mode on all clojure, closurescript and elisp buffers automatically?

江枫思渺然 提交于 2021-02-11 14:14:02
问题 I want to enable paredit-mode on all clojure, cljs and elisp buffers by default, which is probably going to happen through the .spacemacs file. This is what I have so far in the user-config function of my .spacemacs: ;; paredit autoload (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) (add-hook 'clojure-mode #'enable-paredit-mode) (add-hook 'clojurescript-mode #'enable-paredit-mode) But it doesn't really work. What am I doing wrong? 回答1: In the

Why are there clj and cljs folders in my lein re-frame template?

倖福魔咒の 提交于 2021-02-10 12:15:50
问题 Why are there clj and cljs folders in my lein re-frame template as below? And why do they both include files called .core that appear to use the same namespaces? I've been told this is the place to start when learning re-frame, but I cannot find any explanations of why the templates are setup the way they are or created including the content they include. There is no explanation for any of the boilerplate or code that comes with any lein template which make them very hard to use for beginners

Why are there clj and cljs folders in my lein re-frame template?

一笑奈何 提交于 2021-02-10 12:14:21
问题 Why are there clj and cljs folders in my lein re-frame template as below? And why do they both include files called .core that appear to use the same namespaces? I've been told this is the place to start when learning re-frame, but I cannot find any explanations of why the templates are setup the way they are or created including the content they include. There is no explanation for any of the boilerplate or code that comes with any lein template which make them very hard to use for beginners

Why are there clj and cljs folders in my lein re-frame template?

瘦欲@ 提交于 2021-02-10 12:13:26
问题 Why are there clj and cljs folders in my lein re-frame template as below? And why do they both include files called .core that appear to use the same namespaces? I've been told this is the place to start when learning re-frame, but I cannot find any explanations of why the templates are setup the way they are or created including the content they include. There is no explanation for any of the boilerplate or code that comes with any lein template which make them very hard to use for beginners

Why are there clj and cljs folders in my lein re-frame template?

ぐ巨炮叔叔 提交于 2021-02-10 12:13:23
问题 Why are there clj and cljs folders in my lein re-frame template as below? And why do they both include files called .core that appear to use the same namespaces? I've been told this is the place to start when learning re-frame, but I cannot find any explanations of why the templates are setup the way they are or created including the content they include. There is no explanation for any of the boilerplate or code that comes with any lein template which make them very hard to use for beginners

How do I deal with required Clojurescript code from Clojurescript macros?

风流意气都作罢 提交于 2021-02-07 11:51:46
问题 Let us say I have a X.clojurescript and a X.clojure namespace. Everything in X.clojurescript is Clojurescript code, everything in X.clojure is Clojure code. Unfortunately, I cannot define macros directly in Clojurescript, I have to define them in Clojure and then bring them into a Clojurescript namespace using (ns X.clojurescript.abc (:require-macros [X.clojure.def :as clj])) This is fine. However, what if the macro (defined in X.clojure) is going to need to reference something defined in a

Using React Native MapView in ClojureScript Reagent

只谈情不闲聊 提交于 2021-02-06 13:53:43
问题 I am trying to use MapView from https://github.com/airbnb/react-native-maps using Reagent. It works fine but how could I get local state for MapView when onRegionChange event is fired? Trying to use current/component but it is always nil . (def Expo (js/require "expo")) (def map-view (r/adapt-react-class (.-MapView Expo))) (defn my-map [] (r/create-class {:component-did-mount (fn [this] (println "component mount ")) :reagent-render (fn [] (let [this (r/current-component)] [map-view {:style {

Using React Native MapView in ClojureScript Reagent

*爱你&永不变心* 提交于 2021-02-06 13:50:55
问题 I am trying to use MapView from https://github.com/airbnb/react-native-maps using Reagent. It works fine but how could I get local state for MapView when onRegionChange event is fired? Trying to use current/component but it is always nil . (def Expo (js/require "expo")) (def map-view (r/adapt-react-class (.-MapView Expo))) (defn my-map [] (r/create-class {:component-did-mount (fn [this] (println "component mount ")) :reagent-render (fn [] (let [this (r/current-component)] [map-view {:style {

Using React Native MapView in ClojureScript Reagent

有些话、适合烂在心里 提交于 2021-02-06 13:50:50
问题 I am trying to use MapView from https://github.com/airbnb/react-native-maps using Reagent. It works fine but how could I get local state for MapView when onRegionChange event is fired? Trying to use current/component but it is always nil . (def Expo (js/require "expo")) (def map-view (r/adapt-react-class (.-MapView Expo))) (defn my-map [] (r/create-class {:component-did-mount (fn [this] (println "component mount ")) :reagent-render (fn [] (let [this (r/current-component)] [map-view {:style {

lastCallbackNode is not a function

夙愿已清 提交于 2021-01-29 09:22:13
问题 I've imported the farmer-motion library using shadow-cljs. The framer motion library has the custom react component div.motion. It's used as follows: https://www.framer.com/api/motion/examples/#animation : import { motion } from "framer-motion" export const MyComponent = () => ( <motion.div animate={{ scale: 2 }} transition={{ duration: 0.5 }} /> ) I'm using reagent to render the div.motion component: (ns myapp.foo (:require ;; shadow-cljs import [framer-motion :refer (motion MagicMotion