Closed lucywang000 closed 4 years ago
Just found this doesn't work ... The macro expand result is something like
(helix.impl.props/merge-obj
(cljs.core/js-obj "className" "form-input"
"name" "user"
"value" value
"ref" ev/focus-on-render
"onChange" on-change))))
And the value of value
is unknown when doing macro expand.
okay, figured out the code path in the cljc. It shall work now.
btw @Lokeh The cljc part is really mind-boggling, really hard to think about the code path. Have you though using macrovich to make it more maintainable?
@Lokeh updated.
I agree, working in a cljc file is pretty difficult at first. For this, I don't think it's worth pulling in macrovich though. If at some point I decide it's worth trying to support self-hosted ClojureScript, then macrovich might be worth it 🤔
Makes sense. But personally I do feel the entangled reader conditionals really scary, especially when they calls into each other ... YMMV, though.