reactive-python / reactive-python/reactpy

Prevent JavaScript components from crashing ReactPy by adding error boundaries

Open
#676 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority-2-moderate type-revision
Dominant language
Python
Stars
8.1k
Forks
332
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading references #646 and #610, then trace components exported through module_from_template(...) and how tree-node exceptions are handled. Define done as invalid hook calls or other exceptions from those JavaScript components no longer causing ReactPy to fail completely, while pure ReactPy code remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python, react
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.