Liking cljdoc? Tell your friends :D

cartoj.props

Utilities for converting ClojureScript prop maps into JavaScript objects suitable for passing to react-map-gl components.

Convention:

  • Incoming: CLJS map with kebab-case keyword keys (or string keys for pass-through)
  • Outgoing: JS object with camelCase string keys
  • Callback values (fns) are passed through unchanged
  • Nested CLJS maps on JS/CSS props (:initial-view-state, :style, :padding, :bounds, :fit-bounds-options) are converted recursively with camelCase keys.
  • Nested CLJS maps on MapLibre style spec props (:paint, :layout, :filter) are converted recursively with kebab-case keys (e.g. :circle-radius → "circle-radius").
  • All other values are passed through as-is (numbers, strings, booleans)
Utilities for converting ClojureScript prop maps into JavaScript objects
suitable for passing to react-map-gl components.

Convention:
- Incoming: CLJS map with kebab-case keyword keys (or string keys for pass-through)
- Outgoing: JS object with camelCase string keys
- Callback values (fns) are passed through unchanged
- Nested CLJS maps on JS/CSS props (:initial-view-state, :style, :padding,
  :bounds, :fit-bounds-options) are converted recursively with camelCase keys.
- Nested CLJS maps on MapLibre style spec props (:paint, :layout, :filter)
  are converted recursively with kebab-case keys (e.g. :circle-radius → "circle-radius").
- All other values are passed through as-is (numbers, strings, booleans)
raw docstring

kebab->camelcljs

source

props->jscljs

(props->js props)

Convert a ClojureScript props map to a JS object for react-map-gl.

  • Keyword keys are converted from kebab-case to camelCase
  • String keys are used as-is (no conversion)
  • Values for known nested-data keys (:initial-view-state, :style, etc.) are converted with clj->js
  • All other values (including callback fns) pass through unchanged
Convert a ClojureScript props map to a JS object for react-map-gl.

- Keyword keys are converted from kebab-case to camelCase
- String keys are used as-is (no conversion)
- Values for known nested-data keys (:initial-view-state, :style, etc.)
  are converted with clj->js
- All other values (including callback fns) pass through unchanged
sourceraw docstring

props-and-childrencljs

(props-and-children args)

Split Reagent component args into [props children]. If the first arg is nil or a map, it is the props; otherwise props is {}.

Split Reagent component args into [props children].
If the first arg is nil or a map, it is the props; otherwise props is {}.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close