React key can be used to provide identity for components even outside of lists. If the key changes, the component is recreated triggering all the implemented stateful methods (did-unmount, did-mount etc.):
(defn comp []
[:div
^{:key dynamic-id}
[stateful-component]])
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |