app_wrap.py 575 B

12345678910111213141516171819
  1. """Top-level component that wraps the entire app."""
  2. from reflex.components.component import Component
  3. from reflex.components.layout.fragment import Fragment
  4. from reflex.vars import Var
  5. class AppWrap(Fragment):
  6. """Top-level component that wraps the entire app."""
  7. @classmethod
  8. def create(cls) -> Component:
  9. """Create a new AppWrap component.
  10. Returns:
  11. A new AppWrap component containing {children}.
  12. """
  13. return super().create(
  14. Var.create("{children}", _var_is_local=False, _var_is_string=False)
  15. )