This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-30
Channels
- # babashka (46)
- # beginners (234)
- # bristol-clojurians (4)
- # cider (7)
- # clj-kondo (39)
- # cljdoc (8)
- # cljs-dev (10)
- # cljsjs (10)
- # cljsrn (24)
- # clojure (84)
- # clojure-brasil (7)
- # clojure-europe (12)
- # clojure-germany (4)
- # clojure-italy (3)
- # clojure-nl (41)
- # clojure-spec (17)
- # clojure-uk (66)
- # clojurescript (64)
- # conjure (161)
- # cursive (12)
- # data-science (45)
- # datomic (20)
- # devops (11)
- # docker (2)
- # duct (9)
- # events (7)
- # figwheel (1)
- # figwheel-main (20)
- # fulcro (32)
- # graalvm (5)
- # helix (82)
- # jackdaw (9)
- # jobs-discuss (19)
- # kaocha (11)
- # local-first-clojure (1)
- # malli (6)
- # meander (3)
- # nrepl (12)
- # off-topic (2)
- # other-lisps (15)
- # pathom (14)
- # rdf (6)
- # re-frame (8)
- # reactive (1)
- # reagent (5)
- # reitit (4)
- # rum (3)
- # shadow-cljs (77)
- # spacemacs (3)
- # sql (9)
- # test-check (31)
- # tools-deps (13)
- # vim (62)
- # xtdb (18)
I think I'm seeing intermittent behaviour with Krell and asset js/require. With an initially working example, a simple code change and recompile results in an empty Krell_assets.js
{:deps {io.vouch/krell {:git/url ""
:sha "9c88f29fcc25780238914ad52f266c349c2bd787"}
io.vouch/reagent-react-native {:git/url ""
:sha "54bf52788ab051920ed7641f386177374419e847"}
reagent {:mvn/version "1.0.0-alpha1"
:exclusions [cljsjs/react cljsjs/react-dom]}}}
(ns krell-project.core
(:require [react :as react]
[reagent.core :as r]
[reagent.react-native :as rn]
[react-native-reanimated :as re-module]
[react-native-gesture-handler :as rg]))
(def re (.-default re-module))
(def animated-view
(r/adapt-react-class (.-View re)))
(defn ^:export -main [& args]
(r/as-element
[rn/view {:style {:flex 1}}
[rn/view {:style {:flex 1 :align-items "center" :justify-content "center"}}
[animated-view
[rn/image {:source (js/require "../../resources/img/card1.png")
:style {:width 300 :height 200 :borderRadius 18}}]
]
[rn/text "Hello"]
]
]))
When I delete target/
and .cpcache/
and clj -m krell.main -co build.edn -c -r
all works as expected - Krell_assets.js:
module.exports = {
assets: {
"../resources/img/card1.png": require('../resources/img/card1.png') }
};
Krell master has a fix for asset/requires, some of you may have noticed breakage after a recompile - the big problem should be fixed - there may be edge case still - minimal repros would help
If you're going to try master, remove .cpcache
, remove your :output-dir
, and make sure you're not specifying a ClojureScript version - Krell is back on ClojureScript master for now
I'm trying to move from re-natal to Krell on a medium-ish application so it's getting a real-world spin right now
@dnolen that's great. On your medium-is application how are you managing state? Playing with the simple reagent example Ratom doesn't seem to trigger a re-render, I guess because of the wrapping r/as-element.
@admarrs don't follow the tutorial for tips on how to use Reagent, I'm not a Reagent expert - if that's wrong I can fix it