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

Function _use_const

src/py/reactpy/reactpy/core/hooks.py:486–487  ·  view source on GitHub ↗
(function: Callable[[], _Type])

Source from the content-addressed store, hash-verified

484
485
486def _use_const(function: Callable[[], _Type]) -> _Type:
487 return current_hook().use_state(function)
488
489
490def _try_to_infer_closure_values(

Callers 5

use_stateFunction · 0.85
use_debug_valueFunction · 0.85
use_reducerFunction · 0.85
use_memoFunction · 0.85
use_refFunction · 0.85

Calls 2

current_hookFunction · 0.90
use_stateMethod · 0.80

Tested by

no test coverage detected