Skip to content

views: customize rendering of prop-values #10

@divs1210

Description

@divs1210

We don't always want our prop-values to be rendered as plaintext:

  • urls should be clickable
  • images should be displayed
  • etc.

Currently, the view calls (str prop-value).
This could be replaced with something like (render-prop prop-value), where render-prop is a fn/protocol/multimethod that returns hiccup.

This fn could either be passed as part of the :view map passed to re-crud.components/show, where the default could be str, or we could define a multimethod to automatically dispatch based on the type of the prop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions