any thoughts on adding support for ES6 classes? class syntax is required to create custom elements (web components), something I'm missing in ClojureScript
Right now I think you can accomplish this using deftype?
here's how you can do that currently: https://juju.one/create-javascript-class-with-prototype-methods-in-clojurescript/
I think that's not enough to create a custom element, and for that reason shadow-cljs added the defclass macro. At least that's my understanding
Maybe this could be the reason? https://clojure.atlassian.net/browse/CLJS-3084
David asks for something at the end of that issue.
I'm willing to consider it, you can open an issue, but not sure when I will get to it since I also need to consider the pros/cons. You could also decide to implement that custom type in JS and then use it from cherry
There is also a js* special form that might help
$ ./node_cli.js -e '(js* "class Foo {}") (prn (new Foo))'
#object[Foo [object Object]]thanks @borkdude Before opening an issue, I have to research it a bit more (but I don't know when) Maybe the class syntax in not really required. Just wanted to know if there was already some discussion about the topic
first time I've heard it come up, I think most people are using the deftype hack in the blog above, but I'm willing to give it some time, after the talk at ClojureDays (end of this week) :)
unfortunately I'm not attending to the conference, but looking forward to see the recording 🙂