react-live icon indicating copy to clipboard operation
react-live copied to clipboard

Add the ability to use custom LiveError component.

Open laureano-arcanio opened this issue 7 months ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Feature Request

Hi there!

I'm working on a generative UI concept powered by an LLM-based code generator, where the UI components are dynamically generated through LLM outputs.

Since the code is AI-generated, it occasionally contains errors or incomplete implementations. I'd like to integrate a custom LiveError component that can handle these errors gracefully and trigger logic to automatically re-fetch or regenerate the component code when an error occurs.

I believe this would improve the resilience of the live editing experience in LLM-driven workflows.

Would you be open to adding support for this feature? I'd be happy to contribute with a PR if you're on board!

Thanks so much for your work!

laureano-arcanio avatar May 08 '25 13:05 laureano-arcanio

Not sure this is a workaround or your intention, but for now I'm importing LiveContext and creating a component myself. Probably good to document or change to recieve callbacks onError and/or children ? Thanks

laureano-arcanio avatar May 08 '25 13:05 laureano-arcanio