:class
field to viz component.:gup
to the :elem-with-data
piece, which can be used instead of using :did-mount
and :did-update
.gup, allow you to explicitly set attributes and add transitions in the :enter-init
, :enter
, :update
, and :exit
parts of the general update pattern.
As an aside, the traditional :did-mount
and :did-update
only give you access to the update part of the general update pattern (with a sane way of handling enter and exit for you).
rid3->
macro to api. To include it:(ns foo.bar
(:require [rid3.core :as rid3 :refer [rid3->]]))
The purpose of rid3->
is to be able to use a hiccup-like attribute map when setting attributes on a node. For example
(fn [node ratom]
(rid3-> node
{:fill "grey"
:text-anchor "middle"
:style {:font-weight 400}}
(.text "some text")))
would be the same as
(fn [node ratom]
(-> node
(.attr "fill" "grey")
(.attr "text-anchor" "middle")
(.style "font-weight" 400)
(.text "some text")))
Don't use this version ... it had introduced an api that was decided against.
:key-fn
to :elem-with-data
piece:children
from :elem
piece:prepare-dataset
:prepare-dataset
, you will need to move it inside all of the :elem-with-data
pieces.:children
from within an :elem
piece, add a :container
piece and use its :children
insteadCan you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close