File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import reflex as rx
44
55from rxconfig import config
6-
76from .ui .base import base_page
87
8+ from . import pages
9+
910class State (rx .State ):
1011 """The app state."""
1112 label = "Welcome to Reflex!"
@@ -46,5 +47,9 @@ def index() -> rx.Component:
4647 return base_page (my_child )
4748
4849
50+
51+
4952app = rx .App ()
5053app .add_page (index )
54+ app .add_page (pages .about_page , route = '/about' )
55+ app .add_page (pages .pricing_page , route = '/pricing' )
Original file line number Diff line number Diff line change 1+ from .about import about_page
2+ from .pricing import pricing_page
3+
4+ __all__ = [
5+ 'about_page' ,
6+ 'pricing_page'
7+ ]
Original file line number Diff line number Diff line change 1+ import reflex as rx
2+
3+ from ..ui .base import base_page
4+
5+ def about_page () -> rx .Component :
6+ my_child = rx .vstack (
7+ rx .heading ("About Us" , size = "9" ),
8+ rx .text (
9+ "Something cool about us." ,
10+ ),
11+ spacing = "5" ,
12+ justify = "center" ,
13+ align = "center" ,
14+ min_height = "85vh" ,
15+ id = 'my-child'
16+ )
17+ return base_page (my_child )
Original file line number Diff line number Diff line change 1+ import reflex as rx
2+
3+ from ..ui .base import base_page
4+
5+ def pricing_page () -> rx .Component :
6+ my_child = rx .vstack (
7+ rx .heading ("Pricing" , size = "9" ),
8+ rx .text (
9+ "Our Pricing" ,
10+ ),
11+ spacing = "5" ,
12+ justify = "center" ,
13+ align = "center" ,
14+ min_height = "85vh" ,
15+ id = 'my-child'
16+ )
17+ return base_page (my_child )
You can’t perform that action at this time.
0 commit comments