This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-24
Channels
- # announcements (11)
- # beginners (72)
- # calva (11)
- # cider (12)
- # clj-kondo (147)
- # clojure (6)
- # clojure-new-zealand (2)
- # clojuredesign-podcast (2)
- # clojurescript (36)
- # cursive (2)
- # datomic (5)
- # emacs (4)
- # fulcro (57)
- # graalvm (104)
- # graphql (2)
- # jobs (1)
- # joker (1)
- # kaocha (3)
- # malli (51)
- # off-topic (2)
- # portkey (1)
- # reagent (18)
- # shadow-cljs (26)
- # spacemacs (7)
- # tools-deps (5)
- # vim (4)
this is my current iteration of defnc
: https://github.com/Lokeh/helix/blob/master/src/helix/core.clj#L159
it's not too much more code to generate in this case because creating the factory function is just a call to factory
in helix/core.cljs
right now the expectation is that you're using the $
macro to create elements, which does the optimizing shallow clj->js at macro time
What happened to parinfer? Is it dead?
I think it's doing fine. What are you worried about?
As far as I recall, the author has told in one of the videos that he's going for another sabbatical. I assume that's the reason why all his repos are archived.
Ok got it. I was worried that all repos are archived.
I wonder if anyone has looked at lit-html as a possible a ClojureScript target: https://github.com/Polymer/lit-html/wiki/How-it-Works
the hard part will be getting the actual template literals working, since you can't just "fake" them with an array
otherwise this works very similarly to the thing I have been working on https://github.com/thheller/shadow-arborist/blob/master/README.md
only does more work on the server side. not so much on the client. lit-html might actually produce less code so might be worth experimenting with doing more on the client.
is there a codesandbox
like that support clojurescript? that you could play with online?
FWIW, there's this still open feature request: https://github.com/codesandbox/codesandbox-client/issues/704
Never used it, but there is http://nightcoders.net/
I’m sure there was another template library effort from google, aiming to replace the current Soy Closure templates, but for the life of me I can’t remember the name.
The thing I don’t quite understand with lit-html and incremental dom: what their composition model is
One of the first things that react shows in their docs is how to compose two components together
Incremental dom just asks you to pass the “content” as another function. They do say though that it’s meant to be low level, a toolkit for building a library.
const other = (foo) => html`<div>${foo}!</div>`;
const helloTemplate = (name) => html`<div>Hello ${name} ${other("foo")}!</div>`;
incremental-dom you really don't want to write by hand. that really is just a compile target.
Right, so that means that you have to reinvent how to compose effects on mount and after render
I understand it’s supposed to be a low level library, I think I just can’t see yet how a framework composes other than the react way
Yeah I think both of them are quite low level and narrow these days. There’s much more than just rendering to build a nice experience.
I have list that can be filtered by a search box which is in sync within :query atom
inside reframe db
and according to chrome dev tools paint flashing option
if I ever update the query
atom by firing query-changed
event whole list gets re-rendered. I thought only the search box would flash, but it seems any change on the subs
triggers whole component re-render, correct?. (I could just seperate search box component to solve the problem)
@cakir-enes have you tried to deref the subscription in the rendered component rather than in the let?