Create a new memoization leaf component. Args: *children: The children of the component. **props: The props of the component. Returns: The memoization leaf
(cls, *children, **props)
| 1715 | |
| 1716 | @classmethod |
| 1717 | def create(cls, *children, **props) -> Component: |
| 1718 | """Create a new memoization leaf component. |
| 1719 | |
| 1720 | Args: |
| 1721 | *children: The children of the component. |
| 1722 | **props: The props of the component. |
| 1723 | |
| 1724 | Returns: |
| 1725 | The memoization leaf |
| 1726 | """ |
| 1727 | comp = super().create(*children, **props) |
| 1728 | if comp.get_hooks(): |
| 1729 | comp._memoization_mode = cls._memoization_mode.copy( |
| 1730 | update={"disposition": MemoizationDisposition.ALWAYS} |
| 1731 | ) |
| 1732 | return comp |