shadertoy-react
shadertoy-react copied to clipboard
Error handling
I would like to render something different than the black screen when the shader didn't compile, but there is no way to detect that error. I tried using error boundaries and similar, but there is no error thrown. It would be nice to have a "onError" prop.
@Daniel2000815 I recently ran into the same need, as I wanted to be able to grab the errors/warnings and display them in a user facing UI. After talking to @mvilledieu, I decided to fork the library and create a new version at react-shaders and work from there to address the error handling desire among other things (like Typescript by default etc)
If you're still looking for this, let me know and I'll ping you when I have added error handling. At that point I could make a PR for this repo as well if you'd like to continue using shadertoy-react
.