MCPcopy
hub / github.com/reflex-dev/reflex / get_component

Method get_component

tests/units/test_state.py:4852–4863  ·  view source on GitHub ↗

Get the component for the table. Args: data: The data var. Returns: The component.

(cls, data: Var)

Source from the content-addressed store, hash-verified

4850
4851 @classmethod
4852 def get_component(cls, data: Var) -> rx.Component:
4853 """Get the component for the table.
4854
4855 Args:
4856 data: The data var.
4857
4858 Returns:
4859 The component.
4860 """
4861 cls._data = data
4862 cls.computed_vars["data"].add_dependency(cls, data)
4863 return rx.foreach(data, lambda d: rx.text(d.to_string()))
4864
4865
4866@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 3

add_dependencyMethod · 0.80
foreachMethod · 0.80
to_stringMethod · 0.80

Tested by

no test coverage detected