Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Add a component wrapper prop #90

Open
selbekk opened this issue Aug 24, 2023 · 0 comments
Open

[Feature request] Add a component wrapper prop #90

selbekk opened this issue Aug 24, 2023 · 0 comments
Labels

Comments

@selbekk
Copy link

selbekk commented Aug 24, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants