I want to pass an actual keyword as a prop to a react component
How about “:hello” and when you read it you just call keyword on that
I need to pass along namespaced keywords, so not that easy
(subs (str your-kw) 1) .. this handles namespaced kws too... then you can just call (keyword ..) on the string to have it back as it was
such that the keyword gets "passed through"
:>
and create-element
both seem to have the property get stringified in some way
You have to encode the props yourself - Reagent doesn't touch JS objects.
:>
converts the props to JS objects automatically, doing same conversion as Reagent does with DOM nodes, snake-case to camelCase, renaming some probs and keywords to strings. create-element
or :r>
pass the props object as is, but you should pass in JS object as the top-level props, but inside the object you can use whatever Cljs datastructures you want.
You can use regular JS objects with :>
as well, no? So e.g. #js {:a :b}
will make sure that the component receives :b
as a keyword.