Fork me on GitHub
#react
<
2021-10-01
>
Roman Liutikov08:10:17

not that hard actually (.-current react/__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED), but it may break in the future

lilactown16:10:23

I wonder what react devtools will show for your props

Roman Liutikov16:10:03

I think it’s not different from #js {:args [...]} props passing style, which shows implementation details of a data structure

lilactown16:10:53

how would this look from the other side? i.e. element creation

lilactown16:10:17

components written like this can be just given the map, so you can do something like:

($ foo {:foo "bar" :baz [1 2 3]})
for JS components, you'd want to ensure you passed in JS objects instead
($ lib/Foo #js {:foo "bar" :baz #js [1 2 3]})

lilactown16:10:13

I don't hate it. although you'd have to detect in $ to handle either JS objects or maps when associng in children

lilactown16:10:57

perhaps js$ would better differentiate