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

Method dispatch

src/py/reactpy/reactpy/core/hooks.py:83–90  ·  view source on GitHub ↗
(new: _Type | Callable[[_Type], _Type])

Source from the content-addressed store, hash-verified

81 hook = current_hook()
82
83 def dispatch(new: _Type | Callable[[_Type], _Type]) -> None:
84 if callable(new):
85 next_value = new(self.value)
86 else:
87 next_value = new
88 if not strictly_equal(next_value, self.value):
89 self.value = next_value
90 hook.schedule_render()
91
92 self.dispatch = dispatch
93

Callers

nothing calls this directly

Calls 2

strictly_equalFunction · 0.85
schedule_renderMethod · 0.80

Tested by

no test coverage detected