I need it as react key, like in https://github.com/tonsky/datascript-chat/blob/3d4b0c456483f2feb0b9af9ab42e94928ecd2743/src/datascript_chat/ui.cljs in line 83 (rum/defc message [msg] (let [user (:message/author msg)] [:.message {:key (:db/id msg) :class [(when (:message/unread msg) "message_unread") (when (:user/me user) "me")]} but when I put it, it doesn't appear in the dom
Pretty sure React simply doesn't render key as at attr but I could be wrong. Is the issue that you actually need it in the DOM, or is it just that you expect it to be in the DOM and it's not there? It does not appear in the DOM in that sample app, either. https://tonsky.me/datascript-chat/
ok thanks, yes I expect that it is on the dom
You can try using data-key instead