Skip to content

Commit 9826278

Browse files
committed
Add html.h shorthand alias
1 parent 2737ce5 commit 9826278

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/source/about/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ Unreleased
3636
- :pull:`1307` - Added ``reactpy.web.reactjs_component_from_file`` to import ReactJS components from a file.
3737
- :pull:`1307` - Added ``reactpy.web.reactjs_component_from_url`` to import ReactJS components from a URL.
3838
- :pull:`1307` - Added ``reactpy.web.reactjs_component_from_string`` to import ReactJS components from a string.
39+
- :pull:`1314` - Added ``reactpy.h`` as a shorthand alias for ``reactpy.html``.
3940

4041
**Changed**
4142

42-
- :pull:`1284` - The ``key`` attribute is now stored within ``attributes`` in the VDOM spec.
43+
- :pull:`1314` - The ``key`` attribute is now stored within ``attributes`` in the VDOM spec.
4344
- :pull:`1251` - Substitute client-side usage of ``react`` with ``preact``.
4445
- :pull:`1239` - Script elements no longer support behaving like effects. They now strictly behave like plain HTML scripts.
4546
- :pull:`1255` - The ``reactpy.html`` module has been modified to allow for auto-creation of any HTML nodes. For example, you can create a ``<data-table>`` element by calling ``html.data_table()``.

src/reactpy/_html.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
VdomDict,
1414
)
1515

16-
__all__ = ["html"]
16+
__all__ = ["h", "html"]
1717

1818
NO_CHILDREN_ALLOWED_HTML_BODY = {
1919
"area",
@@ -424,3 +424,4 @@ def __getattr__(self, value: str) -> VdomConstructor:
424424

425425

426426
html = HtmlConstructor()
427+
h = html # shorthand alias for html

0 commit comments

Comments
 (0)