vercel / react-tweet

Embed tweets in your React application.
https://react-tweet.vercel.app
MIT License
1.52k stars 83 forks source link

Customize onError behavior #25

Closed petrbela closed 1 year ago

petrbela commented 1 year ago

Right now, notFoundOnError either throws an error or displays the predefined "Not Found" text. It might be more flexible to provide an onError callback to render a custom message or hide it completely. Or is the intention to wrap the error in an ErrorBoundary?

lfades commented 1 year ago

An onError callback might not do it because it involves client-side logic and that's not good for RSC. A custom Error component is the better alternative, however I still need to research what's the right way to do it.

lfades commented 1 year ago

This should have been improved as per the last release.