Fork me on GitHub
#clojurescript
<
2019-11-24
>
lilactown00:11:25

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

lilactown00:11:43

right now the expectation is that you're using the $ macro to create elements, which does the optimizing shallow clj->js at macro time

Karol Wójcik10:11:35

What happened to parinfer? Is it dead?

Roman Liutikov10:11:17

I think it's doing fine. What are you worried about?

p-himik10:11:19

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.

Karol Wójcik12:11:39

Ok got it. I was worried that all repos are archived.

orestis10:11:30

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

thheller12:11:09

the hard part will be getting the actual template literals working, since you can't just "fake" them with an array

polymeris12:11:45

that is, convert hiccup data structures to lit-html/html calls?

thheller12:11:48

otherwise this works very similarly to the thing I have been working on https://github.com/thheller/shadow-arborist/blob/master/README.md

thheller12:11:41

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.

Eliraz14:11:48

is there a codesandbox like that support clojurescript? that you could play with online?

Eliraz15:11:57

okay thanks for letting me know

rakyi15:11:26

Never used it, but there is http://nightcoders.net/

orestis14:11:26

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.

thheller14:11:56

incremental-dom?

lilactown17:11:30

The thing I don’t quite understand with lit-html and incremental dom: what their composition model is

lilactown17:11:28

One of the first things that react shows in their docs is how to compose two components together

lilactown17:11:53

I guess both of them would tell you to use web components

orestis17:11:01

Yeah it seems they both target “string based” templates.

orestis17:11:06

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.

thheller17:11:48

its just function calls to compose things

thheller17:11:26

const other = (foo) => html`<div>${foo}!</div>`;
const helloTemplate = (name) => html`<div>Hello ${name} ${other("foo")}!</div>`;

thheller17:11:32

not exactly pretty though 😉

thheller17:11:42

incremental-dom you really don't want to write by hand. that really is just a compile target.

lilactown17:11:16

Right, so that means that you have to reinvent how to compose effects on mount and after render

lilactown17:11:35

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

orestis17:11:51

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.

ec21:11:24

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)

Lu21:11:52

@cakir-enes have you tried to deref the subscription in the rendered component rather than in the let?

evocatus22:11:30

Is it a good idea to use Node.JS and ClojureScript for backend instead of JVM + Clojure? Does anyone do it? Are there any ClojureScript backend libraries/frameworks?