Exported Python API signatures¶
Generated from the source AST by python scripts/generate_api.py.
For behavior and runnable examples, read the API guide and hooks reference.
Rendering functions require the browser or Node/Pyodide runtime; importing the package itself works in ordinary Python.
The _UNSET default means an optional React argument is omitted. html and svg are dynamic tag namespaces.
Classes¶
ClassComponent¶
Import: pyreact_forge.ClassComponent
Subclass and decorate with @class_component; render() returns an element.
Lifecycle names use snake_case. set_state accepts a partial dictionary or a function of previous state, with React's ordinary asynchronous merge rules.
PureComponent¶
Import: pyreact_forge.PureComponent
class_component¶
Import: pyreact_forge.class_component
Core¶
Component¶
Import: pyreact_forge.Component
A reusable Python component, invoked by React rather than eagerly.
Context¶
Import: pyreact_forge.Context
Ref¶
Import: pyreact_forge.Ref
Root¶
Import: pyreact_forge.Root
RuntimeRequiredError¶
Import: pyreact_forge.RuntimeRequiredError
activity¶
Import: pyreact_forge.activity
add_transition_type¶
Import: pyreact_forge.add_transition_type
cache¶
Import: pyreact_forge.cache
cache_signal¶
Import: pyreact_forge.cache_signal
children_count¶
Import: pyreact_forge.children_count
children_to_array¶
Import: pyreact_forge.children_to_array
clone_element¶
Import: pyreact_forge.clone_element
component¶
Import: pyreact_forge.component
create_context¶
Import: pyreact_forge.create_context
create_portal¶
Import: pyreact_forge.create_portal
create_ref¶
Import: pyreact_forge.create_ref
create_root¶
Import: pyreact_forge.create_root
debug_stats¶
Import: pyreact_forge.debug_stats
error_boundary¶
Import: pyreact_forge.error_boundary
flush_sync¶
Import: pyreact_forge.flush_sync
forward_ref¶
Import: pyreact_forge.forward_ref
fragment¶
Import: pyreact_forge.fragment
h¶
Import: pyreact_forge.h
Create an element. HTML/SVG use snake_case props; Python props stay intact.
html¶
Import: pyreact_forge.html
Dynamic tag namespace: for example html.div(...), svg.circle(...) or html("custom-element", ...).
hydrate_root¶
Import: pyreact_forge.hydrate_root
import_component¶
Import: pyreact_forge.import_component
Use a JS React component registered with registerComponent(name, value).
is_valid_element¶
Import: pyreact_forge.is_valid_element
lazy¶
Import: pyreact_forge.lazy
map_children¶
Import: pyreact_forge.map_children
memo¶
Import: pyreact_forge.memo
mount¶
Import: pyreact_forge.mount
preconnect¶
Import: pyreact_forge.preconnect
prefetch_dns¶
Import: pyreact_forge.prefetch_dns
preinit¶
Import: pyreact_forge.preinit
preinit_module¶
Import: pyreact_forge.preinit_module
preload¶
Import: pyreact_forge.preload
preload_module¶
Import: pyreact_forge.preload_module
profiler¶
Import: pyreact_forge.profiler
request_form_reset¶
Import: pyreact_forge.request_form_reset
runtime_capabilities¶
Import: pyreact_forge.runtime_capabilities
strict_mode¶
Import: pyreact_forge.strict_mode
suspense¶
Import: pyreact_forge.suspense
svg¶
Import: pyreact_forge.svg
Dynamic tag namespace: for example html.div(...), svg.circle(...) or html("custom-element", ...).
view_transition¶
Import: pyreact_forge.view_transition
Hooks¶
start_transition¶
Import: pyreact_forge.start_transition
use¶
Import: pyreact_forge.use
use_action_state¶
Import: pyreact_forge.use_action_state
use_callback¶
Import: pyreact_forge.use_callback
use_context¶
Import: pyreact_forge.use_context
use_debug_value¶
Import: pyreact_forge.use_debug_value
use_deferred_value¶
Import: pyreact_forge.use_deferred_value
use_effect¶
Import: pyreact_forge.use_effect
use_effect_event¶
Import: pyreact_forge.use_effect_event
use_form_status¶
Import: pyreact_forge.use_form_status
use_id¶
Import: pyreact_forge.use_id
use_imperative_handle¶
Import: pyreact_forge.use_imperative_handle
use_insertion_effect¶
Import: pyreact_forge.use_insertion_effect
use_layout_effect¶
Import: pyreact_forge.use_layout_effect
use_memo¶
Import: pyreact_forge.use_memo
use_optimistic¶
Import: pyreact_forge.use_optimistic
use_reducer¶
Import: pyreact_forge.use_reducer
use_ref¶
Import: pyreact_forge.use_ref
use_state¶
Import: pyreact_forge.use_state
use_sync_external_store¶
Import: pyreact_forge.use_sync_external_store
use_transition¶
Import: pyreact_forge.use_transition
Resource¶
Resource¶
Import: pyreact_forge.Resource
resource¶
Import: pyreact_forge.resource
Optional router¶
Link¶
Import: pyreact_forge.router.Link
Router¶
Import: pyreact_forge.router.Router
match_path¶
Import: pyreact_forge.router.match_path
Match literal paths, :parameters and a trailing *; query/hash are ignored.
navigate¶
Import: pyreact_forge.router.navigate
use_location¶
Import: pyreact_forge.router.use_location