Skip to content

Commit

Permalink
Fix docs mentioning snake_case when refering to kebab-case
Browse files Browse the repository at this point in the history
Fixes #600
  • Loading branch information
Deraen committed Sep 19, 2024
1 parent fd79a26 commit 5120b40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/UsingHiccupToDescribeHTML.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/reagent/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/reagent/impl/component.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 5120b40

Please sign in to comment.