diff --git a/src/reactpy/backend/hooks.py b/src/reactpy/backend/hooks.py index f2dce5501..981461316 100644 --- a/src/reactpy/backend/hooks.py +++ b/src/reactpy/backend/hooks.py @@ -12,6 +12,7 @@ def use_connection() -> Connection[Any]: + """Get the current :class:`~reactpy.backend.types.Connection`.""" conn = use_context(ConnectionContext) if conn is None: raise RuntimeError("No backend established a connection.") # pragma: no cover @@ -19,8 +20,10 @@ def use_connection() -> Connection[Any]: def use_scope() -> MutableMapping[str, Any]: + """Get the current :class:`~reactpy.backend.types.Connection`'s scope.""" return use_connection().scope def use_location() -> Location: + """Get the current :class:`~reactpy.backend.types.Connection`'s location.""" return use_connection().location