MCPcopy Index your code
hub / github.com/reactive-python/reactpy / use_scope

Function use_scope

src/py/reactpy/reactpy/backend/hooks.py:26–34  ·  view source on GitHub ↗

Get the current :class:`~reactpy.backend.types.Connection`'s scope.

()

Source from the content-addressed store, hash-verified

24
25
26def use_scope() -> MutableMapping[str, Any]: # nocov
27 """Get the current :class:`~reactpy.backend.types.Connection`'s scope."""
28 warn(
29 "The module reactpy.backend.hooks has been deprecated and will be deleted in the future. "
30 "Call reactpy.use_scope instead.",
31 DeprecationWarning,
32 )
33
34 return use_connection().scope
35
36
37def use_location() -> Location: # nocov

Callers

nothing calls this directly

Calls 2

warnFunction · 0.90
use_connectionFunction · 0.70

Tested by

no test coverage detected