Clojurians
#cljs-dev
<
2018-12-12
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

lilactown22:12:00

currently, it seems that I can’t attach metadata to JS objects

lilactown22:12:05

are there any blockers to implementing this?

mfikes22:12:25

@lilactown I don't think you'd need any support from the compiler to do things with meta, given the extensible use of protocols. You'd probably have to be clever not to mess with normal ClojureScript types, but you could do something like https://gist.github.com/mfikes/122814757fd1f2aec9de509446793e5f

lilactown22:12:53

what I’m really digging for is a way to add metadata to React elements

lilactown22:12:38

unfortunately, they don’t have their own prototype - they’re just a generic JS obj with fields :disappointed: