On Beagle, navigation works as a type of Action, which can be used by all components that receives an action.
After these configurations, just add the example code as a return of your service and call the endpoint, defined in your controller, in your frontend.
Some navigation actions needs a parameter. It is possible to receive two route type:
url
points into an API that will return one of more Beagle’s components.On the example below, see a case where the route
is remote
:
{
"_beagleComponent_": "beagle:button",
"text": "Click me!",
"onPress": [
{
"_beagleAction_": "beagle:pushStack",
"route": {
"url": "/my-next-screen",
"shouldPrefetch": false
}
}
]
}
Button(
text = "Click me!",
onPress = listOf(
Navigate.PushStack(
route = Route.Remote("/my-next-screen")
)
)
)
Next you will see more details about Beagle’s navigation types:
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.