portal

2024-06-16T08:52:43.133259Z

I am creating custom viewers by wrapping the inspector component. It seems that customizing works both by passing props and metadata. Is there a difference between these two and considerations which one to prefer?

;; Using metadata
[ins/inspector
 {}
 (with-meta value {::pv/default ::pv/table})]

;; Using props
[ins/inspector
 {::pv/default ::pv/table}
 (with-meta value {})]

2024-07-25T11:17:51.399459Z

yeah, in my case I pass values that support metadata, so the metadata approach will likely be more predictable 👍

👍 1
djblue 2024-07-11T05:50:19.444369Z

Sorry it's taken a bit to respond, but I would say the metadata way would be the more "officially" supported method but either works. Did you end up choosing a strategy?

djblue 2024-07-11T05:51:05.833239Z

I think the biggest constraint is if the value you intend to pass to this viewer supports metadata 👌