diff --git a/doc/UsingHiccupToDescribeHTML.md b/doc/UsingHiccupToDescribeHTML.md index 65bc61d1..c5c315d8 100644 --- a/doc/UsingHiccupToDescribeHTML.md +++ b/doc/UsingHiccupToDescribeHTML.md @@ -69,7 +69,7 @@ Use a string as a key for the `:style` map: ``` NOTE: This is due to how Reagent turns keywords as map keys to Object -properties with conversion from snake-case to camelCase, which React +properties with conversion from kebab-case to camelCase, which React also uses with CSS properties (vs. regular CSS). It could be possible to change the implementation to skip the case-conversion for properties starting with `--` but it isn't implemented now. diff --git a/src/reagent/core.cljs b/src/reagent/core.cljs index 3758a7e2..9c2320b8 100644 --- a/src/reagent/core.cljs +++ b/src/reagent/core.cljs @@ -94,7 +94,7 @@ Everything is optional, except either :reagent-render or :render. Map keys should use `React.Component` method names (https://reactjs.org/docs/react-component.html), - and can be provided in snake-case or camelCase. + and can be provided in kebab-case or camelCase. State can be initialized using constructor, which matches React.Component class, or using getInitialState which matches old React createClass function and is diff --git a/src/reagent/impl/component.cljs b/src/reagent/impl/component.cljs index 3304b9e6..f1a3770e 100644 --- a/src/reagent/impl/component.cljs +++ b/src/reagent/impl/component.cljs @@ -285,7 +285,7 @@ "Creates JS class based on provided Clojure map. Map keys should use `React.Component` method names (https://reactjs.org/docs/react-component.html), - and can be provided in snake-case or camelCase. + and can be provided in kebab-case or camelCase. Constructor function is defined using key `:getInitialState`. React built-in static methods or properties are automatically defined as statics."