Reputation: 1102
I want to write this js style map in cljs:
const pathLength = useSpring(yRange, { stiffness: 400, damping: 90 })
<div style={{
pathLength,
rotate: 90,
translateX: 5,
translateY: 5,
scaleX: -1, // Reverse direction of line animation
}}></div>
I have the following:
[:div {:style {path-length
:rotate 90 :translateX 5
:translateY 5
:scaleX -1}}]
But the error I get is:
Map literals must contain an even number of forms.
How to fix this?
Upvotes: 1
Views: 52
Reputation: 4356
{ pathLength }
in JS is short for { pathLength: pathLength }
.
In CLJS you just write {:pathLength path-length}
.
Upvotes: 1