Skip to content

Apply Composables to all subroutes #78

Answered by hfhbd
abueide asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @abueide,

lets start with the core concept of routing first:

This (common) router implementation is basically a trie router, starting with the / route and going down to each directly nodes (children) recursively. There are two different kind of nodes: terminal content nodes containing a @Composable, and routing nodes, containing more nodes and finally a terminal content node. The routing nodes can not have any @composable functions! The location string (from your browser) is split by / and the first matching node will be executed, either showing its content or, if it is a routing node, drop its starting matching route from the location string and find the first next matching node again.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hfhbd
Comment options

You must be logged in to vote
0 replies
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
Converted from issue

This discussion was converted from issue #71 on September 21, 2021 12:57.