-
Hi, I have a The main The views:
This works, but it's not a How can I construct a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @foodstan, Check the "Configuring the Initial Request" section of Adding Parameters to Queryable Types, and the following sections. In your case, since struct MessageList: View {
@Query<MessageRequest> private var messages: [Message]
init(group: Group) {
let request = MessageRequest(group: group)
_messages = Query(request)
}
} This will allow |
Beta Was this translation helpful? Give feedback.
Hello @foodstan,
Check the "Configuring the Initial Request" section of Adding Parameters to Queryable Types, and the following sections.
In your case, since
MainView
just wants to initialize MessageList with an "initial request", you'll probably end up with:This will allow
MessageList
to further control the request if it needs (filter messages, etc), through$messages
.