Python port of react-dom (parity target: facebook/react packages/react-dom).
Project description
ryact-dom
Python port of react-dom (parity target: facebook/react packages/react-dom).
The renderer targets a deterministic in-Python DOM abstraction so behavior can be asserted in pytest.
Install
pip install ryact-dom
Tiny example (render)
from ryact import create_element
from ryact_dom import create_root
from ryact_dom.dom import Container
container = Container()
root = create_root(container)
root.render(create_element("div", {"id": "a"}, "hello"))
Tiny example (server render)
from ryact import create_element
from ryact_dom import render_to_string
html = render_to_string(create_element("div", {"id": "x"}, "hi"))
Source of truth
- Upstream:
https://github.com/facebook/react/tree/main/packages/react-dom
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ryact_dom-0.0.1.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ryact_dom-0.0.1.tar.gz.
File metadata
- Download URL: ryact_dom-0.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b119e3aac568792b3952f0cdd76263af7ac8de4283e73a58afa69f32a2fa6ae5
|
|
| MD5 |
e4605539329443aeae1a239605e6f219
|
|
| BLAKE2b-256 |
bf9f692b18be010446546d1bdd2813cf845402ee6ba906785bfe29b3d2739f4c
|
File details
Details for the file ryact_dom-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ryact_dom-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
204003064bff2dc2ff88242f900970f27e70b9cfdafd9046cf165fbabc37ed4b
|
|
| MD5 |
1733770f3b699e22922d7cf9a0aaa58f
|
|
| BLAKE2b-256 |
7d2546ee34c67b3297a5d33c091161c2adb26fe2b617a8a9f18fceef0a2c6b0e
|