Hello, I'm trying to use Child Pages for a list of...
# decompose
l
Hello, I'm trying to use Child Pages for a list of pages that gets updated over time. Is this possible, or is it currently intended for static page lists and only passed into
initialPages
?
My goal is to use this for infinite scrolling, which is why I want to add items over time. Maybe that's not what the navigation model is intended for?
a
This is supported, you can add/remove/replace pages dynamically.
l
How can I access the list/those operations? That's what I'm confused about and haven't found documentation for.
a
Please see the docs. Basically, you can add pages as follows:
Copy code
navigation.navigate { it.copy(items = it.items + <new_batch>) }
Also please see: https://github.com/arkivanov/Decompose/discussions/462.