Skip to content

Multi-page application #5302

Closed Answered by lucasmerlin
CodeCanna asked this question in Q&A
Oct 24, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi! That's definitely possible.
For different pages, you could e.g. use an enum, something like:

enum Page {
  Home(HomePage),
  Post(PostPage),
}

and HomePage and PostPage would be structs holding the different variables for your different pages, eg PostPage could have a post_id.

You could also have a look at egui_router which allows you to define routes like in axum and has support for reading the url params and for customizable page transitions.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CodeCanna
Comment options

Answer selected by CodeCanna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants