cherry

danielneal 2023-10-24T12:33:34.616269Z

Just found out about cherry - I’m interested in how the #jsx reader tag works. Are there any details about it? How does it know when a symbol or expression represents dynamic props or when they are children?

borkdude 2023-10-24T12:37:36.256879Z

The details are in the documentation :) Any expression starting with ( introduces a new non-jsx scope so:

#jsx [:a (str (+ 1 2 3))]
#jsx [:div [:a ...]]
#jsx [:div [:a (let [x 1] #jsx [:p (str x)]]]]
etc

danielneal 2023-10-24T12:47:48.261979Z

aha gotcha

borkdude 2023-10-24T12:49:02.049129Z

I'm simultaneously working on #squint which is like cherry, but re-implements the stdlib in pure JS

borkdude 2023-10-24T12:49:37.065849Z

which yields much smaller JavaScript bundles. Also it has more features right now like watching directories (which will be ported to cherry as well)

danielneal 2023-10-24T12:49:41.791549Z

ah you mean in the sprint docs I see it now

borkdude 2023-10-24T12:49:54.154849Z

sprint?

danielneal 2023-10-24T12:49:59.234289Z

squint

danielneal 2023-10-24T12:50:04.082379Z

too much jira lol

borkdude 2023-10-24T12:50:06.624389Z

gotcha :)

borkdude 2023-10-24T12:50:31.523369Z

here is a vite + react example: https://github.com/squint-cljs/squint/tree/main/examples/vite-react

danielneal 2023-10-24T12:52:21.794509Z

cool!!