reactpy
reactpy copied to clipboard
Prevent JavaScript components from crashing ReactPy by adding error boundaries
Current Situation
Currently, if an invalid hook call occurs then ReactPy completely breaks.
Reference
- #646
- #610
Proposed Actions
Add an error boundary to tree nodes to prevent complete failure upon tree exceptions. Probably only want to apply this to things that have been exported via module_from_template(...). We have no reason to assume this exception can happen with any pure ReactPy code.
I've had this happen once again, despite pinned versions of react bootstrap. I'm still not entirely sure why this occurs.
A potential solution is naming the files on disk based on a calculated hash, rather than NPM package name.
Since this can break idom until the user clears his browser cache, I'm going to change the priority/milestone for this.
@rmorshea This seems to be almost a weekly breaking issue for me, assuming that I'm not clearing cache on each page load.
The only way I've found to replicate this issue is very artificial and I'd almost expect it to fail. The less consistent but more realistic way involves me just waiting for it to randomly happen.
Related to:
- #646