Skip to content

[Feature request] Add a component wrapper prop #90

@selbekk

Description

@selbekk

I would love to wrap all of my type serializers in error boundaries. Instead of adding one to each of my serializers, I would love to have a prop that I could provide a component that wraps all serializers.

Example usage:

<PortableText 
  value={value} 
  components={components} 
  componentWrapper={({ children }) => (
    <ErrorBoundary fallback={<div>Error</div>}>
      {children}
    </ErrorBoundary>
  )}
/>

Is this something you could look into?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions