Closed lilactown closed 4 years ago
This PR implements the ability to use spread props with JS objects. This way:
(let [dynamic-obj #js {:baz "jkl"}] ($ component {:foo "bar" & dynamic-obj}))
Works just the same as spreading a map today.
This is especially nice for using libraries that pass you props using either a hook or a render-as-child/prop pattern:
($ SomeLib (fn [props] (d/div {& props} "hi")))
This PR implements the ability to use spread props with JS objects. This way:
Works just the same as spreading a map today.
This is especially nice for using libraries that pass you props using either a hook or a render-as-child/prop pattern: