You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes django_form events such as on_error will not be executed.
This appears to be caused by a race condition where the use_effect(render_form) hook could be cancelled prior to full execution.
It is presumed that this issue is related to current ReactPy use_effect design that cancels all async effects upon every re-render. The set_state function queues a render, and fact that set_state is asynchronously being called in several locations within the django_form component is likely causing abrupt re-renders (which subsequently causes early use_effect termination).
Proposed Actions
This issue will likely need to be resolved in ReactPy core, and might require creating an effect rendering queue on a per-component basis.
Current Situation
Sometimes
django_form
events such ason_error
will not be executed.This appears to be caused by a race condition where the
use_effect(render_form)
hook could be cancelled prior to full execution.It is presumed that this issue is related to current ReactPy
use_effect
design that cancels all async effects upon every re-render. Theset_state
function queues a render, and fact thatset_state
is asynchronously being called in several locations within thedjango_form
component is likely causing abrupt re-renders (which subsequently causes earlyuse_effect
termination).Proposed Actions
This issue will likely need to be resolved in ReactPy core, and might require creating an effect rendering queue on a per-component basis.
Related PR: reactive-python/reactpy#1169
The text was updated successfully, but these errors were encountered: