diff --git a/docs/technical-guide/developer/ui.md b/docs/technical-guide/developer/ui.md index c5c5cdd02f..ec2cd64ca8 100644 --- a/docs/technical-guide/developer/ui.md +++ b/docs/technical-guide/developer/ui.md @@ -36,7 +36,6 @@ We want to hold our UI code to the same quality standards of the rest of the cod ```clojure (mf/defc primary-button* - {::mf/props :obj} [{:keys [children] :rest props}] [:> "button" props children]) ``` @@ -69,7 +68,6 @@ For instance, here the user would be in total control of the "button" props @@ -116,7 +113,6 @@ This is achieved by accepting a class prop ```clojure (mf/defc button* - {::mf/props :obj} [{:keys [children class] :rest props}] (let [class (dm/str class " " (stl/css :primary-button)) props (mf/spread-props props {:class class})] @@ -131,7 +127,6 @@ Nested styles for DOM elements that are not instantiated by our component should ```clojure (mf/defc button* - {::mf/props :obj} [{:keys [children] :rest props}] (let [props (mf/spread-props props {:class (stl/css :primary-button)})] ;; note that we are NOT instantiating a here. @@ -156,7 +151,6 @@ Nested styles for DOM elements that are not instantiated by our component should ```clojure (mf/defc button* - {::mf/props :obj} [{:keys [icon children class] :rest props}] (let [props (mf/spread-props props {:class (stl/css :button)})] [:> "button" props @@ -404,7 +398,7 @@ Please refer to the [Rumext User Guide](https://funcool.github.io/rumext/latest/ Some things to have in mind: -- When you want to use JavaScript props, use the meta {::mf/props :obj}. In this case, avoid using ? for boolean props, since they don't get a clean translation to JavaScript. +- Avoid using ? for boolean props, since they don't get a clean translation to JavaScript. - You can use type hints such as ^boolean to get JS semantics. - Split big components into smaller ones. You can mark components as private with the ::mf/private true meta. @@ -422,7 +416,6 @@ We just need to use `:rest ` when declaring the component props. ```clojure (mf/defc button* - {::mf/props :obj} [{:keys [children] :rest other}] [:> "button" other children]) ``` @@ -431,7 +424,6 @@ If we need to augment this props object, we can use (deref) if ```clojure (defc accordion - {::mf/props :obj} [{:keys [^boolean default-open title children] :as props] (let [