Props with numbers in are dropped or truncated
danielneal opened this issue · comments
Daniel Neal commented
Props that contain numbers that get passed to components defined with defnc
end up going missing or having the numbers truncated.
For example - the test component below never receives a value for :x1
, and receives a value for :test
rather than :test2
(defnc Test
[opts]
(println opts)
[:div])
[Test {:x1 0 :test2 1}] => {: 0 :test 1 :class nil}
You can also see this if you call (hx.react/props->clj #js {"x0" 1})
directly.
I think this is because of the implementation of camel->kebab
.
Will Acton commented
Nice find! Fixed with 3afd7d4