From 6033d271c326e9bd44335096ff1bf12eacb4d87d Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 3 Feb 2025 02:18:14 -0800 Subject: [PATCH] docstring and changelog --- docs/source/about/changelog.rst | 1 + src/reactpy/core/hooks.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/source/about/changelog.rst b/docs/source/about/changelog.rst index 7e4119f0b..9870c2b01 100644 --- a/docs/source/about/changelog.rst +++ b/docs/source/about/changelog.rst @@ -22,6 +22,7 @@ Unreleased - :pull:`1113` - Added ``standard``, ``uvicorn``, ``jinja`` installation extras (for example ``pip install reactpy[standard]``). - :pull:`1113` - Added support for Python 3.12 and 3.13. - :pull:`1264` - Added ``reactpy.use_async_effect`` hook. +- :pull:`1267` - Added ``shutdown_timeout`` parameter to the ``reactpy.use_async_effect`` hook. **Changed** diff --git a/src/reactpy/core/hooks.py b/src/reactpy/core/hooks.py index 7f4f31ea3..908c4a88d 100644 --- a/src/reactpy/core/hooks.py +++ b/src/reactpy/core/hooks.py @@ -120,7 +120,12 @@ def use_effect( function: _SyncEffectFunc | None = None, dependencies: Sequence[Any] | ellipsis | None = ..., ) -> Callable[[_SyncEffectFunc], None] | None: - """See the full :ref:`Use Effect` docs for details + """ + A hook that manages an synchronous side effect in a React-like component. + + This hook allows you to run a synchronous function as a side effect and + ensures that the effect is properly cleaned up when the component is + re-rendered or unmounted. Parameters: function: