145. Configuring the Handling of Query Parameters

Jul 15, 2026 05:37 · 1:50 · English · Whisper Turbo · 2 Cynhadledd
Mae'r trosglwyddiad hwn yn darfod heddiw. Uwchraddio i storfa barhaol →
Dangos yn Unig
0:02
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
So in the last lecture,
0:03
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
we tried to improve our application a bit more,
0:05
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
but the issue is our query parameters are gone whenever we
0:09
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
navigate away from our single server component to the added server component,
0:13
S… Speaker 2 (145. Configuring the Handling of Query Parameters)
for example.
0:14
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
So we want to preserve them because we already set this
0:18
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
information at the point of time we visit a single server.
0:21
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
Now we want to preserve this information once we navigate one step further
0:26
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
to the added server component.
0:28
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
To preserve that information,
0:30
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
we get a simple way of doing so.
0:32
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
In the server component where we navigate,
0:34
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
we can pass another property or add another
0:38
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
property to this JavaScript object we use to configure our
0:43
S… Speaker 2 (145. Configuring the Handling of Query Parameters)
navigation.
0:43
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
And here we get the query params handling
0:47
S… Speaker 2 (145. Configuring the Handling of Query Parameters)
property.
0:49
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
Now query params handling takes a string as a value
0:53
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
and this could be merge to merge our old query
0:57
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
params with any new we might add here.
0:59
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
Now we don't add any new ones,
1:02
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
so we can simply choose preserve instead and
1:06
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
preserve, which will overwrite the default behavior,
1:08
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
which is to simply drop them.
1:11
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
and make sure that the old ones are kept.
1:13
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
Now if we were to add new ones here,
1:16
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
the old ones would actually overwrite the new ones,
1:18
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
so we should use merge in this case.
1:20
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
But since we don't add new ones,
1:22
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
preserve should make sure that we don't lose them.
1:25
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
So now if you click on this again and click edit server,
1:29
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
now you see allowEdit equal to zero is still set.
1:33
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
And therefore on the dev server,
1:35
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
where it is set to 1 if we click edit server,
1:37
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
we do see the edit menu again.
1:39
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
So query params handling here,
1:42
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
super important,
1:43
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
super useful to know,
1:44
S… Speaker 1 (145. Configuring the Handling of Query Parameters)
to make sure you don't lease the information you had before.

Creuwyd y trawsgrifiad hwn gan AI (cydnabod llais awtomatig). Gall gynnwys gwallau - gwiriwch yn erbyn y sain wreiddiol am ddefnydd pwysig. Polisi AI

❤️ Love STT.ai? Dweud wrth eich ffrindiau!
Crynodeb
Cliciwch Crynodeb i greu crynodeb AI o' r trosysgrif yma.
Crynodeb...
Gofyn i AI Am Y Trawssgrifiad Yma
Gofynnwch unrhyw beth am y trosglwyddiad hwn — bydd y AI yn canfod adrannau perthnasol ac yn ateb.