This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-24
Channels
- # announcements (11)
- # babashka (11)
- # beginners (36)
- # biff (14)
- # cider (2)
- # clj-commons (9)
- # clojure (34)
- # clojure-czech (2)
- # clojure-europe (65)
- # clojure-nl (2)
- # clojure-norway (12)
- # clojure-uk (4)
- # clojuredesign-podcast (7)
- # clojurescript (5)
- # cursive (8)
- # deps-new (6)
- # hugsql (1)
- # humbleui (2)
- # hyperfiddle (5)
- # leiningen (21)
- # off-topic (2)
- # polylith (5)
- # practicalli (1)
- # releases (1)
- # sci (64)
- # sql (9)
- # squint (43)
- # test-check (6)
- # vim (7)
Hmm, somehow the import maps stuff doesn't work properly on my iPhone SE with iOS 15.8 (even though I have a shim from jspm in there): https://squint-cljs.github.io/squint/?src=https%3A%2F%2Fgist.githubusercontent.com%2Fborkdude%2Fca3af924dc2526f00361f28dcf5d0bfb%2Fraw%2F09cd9e17bf0d6fa3655d0e7cbf2c878e19cb894f%2Fpinball.cljs It does work on an iPhone 13 mini with iOS 16.6.1
The squint playground now auto-saves your state so when you're working on an Advent of Code solution, you don't accidentally lose it when refreshing the window
New blog! Playing Advent of Code with Squint https://blog.michielborkent.nl/squint-advent-of-code.html
In React Native, using such constructs to combine styles is a common pattern:
<Pressable style={[styles.button, { backgroundColor: "#fff" }]}>
styles.button is js-object with stiles created by StyleSheet (abstraction of CSS)
If i try write it like
[:Pressable {:style [styles.button {:backgroundColor "#fff"}]}]
l’ll get
<Pressable style=<styles.button backgroundColor="#fff"></styles.button>></Pressable>
Of course there is couple workaround, but it would be nice to support this syntaxI am looking at your PR now. A small adjustment: if you write a component name, don't use the keywords, use Pressable
. This will also make the function "used" for the linter:
Note that I wrote :View
here but changed the rest:
What is the non-sugared equivalent of
style={[styles.button, { backgroundColor: "#fff" }]
I think this creates a new object and loses the magic of using StyleSheet, which caches styles for reuse
I think it’s not such a big problem,
{:& (.-button styles) :backgroundColor "#fff"}
looks niceI think there is no need for nesting here at all. For nesting there is special method in StyleSheet
where can I find documentation about this syntax?
style={[styles.button, { backgroundColor: "#fff" }]
I haven’t seen a description of this particular syntax anywhere, but it appears everywhere
i try to translate to squint this example https://docs.expo.dev/tutorial/build-a-screen/
@U5B5BAVB6 try this:
{:style (do [styles.container {:backgroundColor "#aff"}])}