सिर्फ दिखाएँ
0:01
S… Speaker 2 (289. Fixing a Bug with the Resolver)
If I do fetch my recipes and I try to edit one of them,
0:05
S… Speaker 2 (289. Fixing a Bug with the Resolver)
for example,
0:06
S… Speaker 2 (289. Fixing a Bug with the Resolver)
I want to add an exclamation mark here,
0:07
S… Speaker 2 (289. Fixing a Bug with the Resolver)
you see that these changes are not saved.
0:11
S… Speaker 2 (289. Fixing a Bug with the Resolver)
And the reason for that is the resolver,
0:12
S… Speaker 2 (289. Fixing a Bug with the Resolver)
which is used whenever we visit the recipe detail route.
0:16
S… Speaker 2 (289. Fixing a Bug with the Resolver)
It fetches new recipes from the server and that simply overwrites
0:20
S… Speaker 2 (289. Fixing a Bug with the Resolver)
our existing recipes,
0:22
S… Speaker 2 (289. Fixing a Bug with the Resolver)
including our changes to these recipes.
0:24
S… Speaker 2 (289. Fixing a Bug with the Resolver)
Now the solution is,
0:27
S… Speaker 2 (289. Fixing a Bug with the Resolver)
to first check whether we do have recipes and only fetch new ones
0:31
S… Speaker 2 (289. Fixing a Bug with the Resolver)
if we don't.
0:32
S… Speaker 2 (289. Fixing a Bug with the Resolver)
So I can inject my recipes
0:36
S… Speaker 1 (289. Fixing a Bug with the Resolver)
service here,
0:38
S… Speaker 1 (289. Fixing a Bug with the Resolver)
like this,
0:41
S… Speaker 2 (289. Fixing a Bug with the Resolver)
import it from recipe service.
0:43
S… Speaker 1 (289. Fixing a Bug with the Resolver)
With this injected,
0:45
S… Speaker 2 (289. Fixing a Bug with the Resolver)
we can get our recipes from this recipe service,
0:49
S… Speaker 1 (289. Fixing a Bug with the Resolver)
get recipes.
0:52
S… Speaker 2 (289. Fixing a Bug with the Resolver)
And now we can check if recipes length is equal to zero,
0:56
S… Speaker 2 (289. Fixing a Bug with the Resolver)
then this means we have no recipes and we should fetch them.
1:00
S… Speaker 1 (289. Fixing a Bug with the Resolver)
Otherwise, if this is not zero,
1:02
S… Speaker 2 (289. Fixing a Bug with the Resolver)
we can just return these recipes because then,
1:05
S… Speaker 2 (289. Fixing a Bug with the Resolver)
well, we do have recipes,
1:06
S… Speaker 2 (289. Fixing a Bug with the Resolver)
so no need to fetch them again.
1:08
S… Speaker 2 (289. Fixing a Bug with the Resolver)
With that change,
1:10
S… Speaker 2 (289. Fixing a Bug with the Resolver)
we can still reload the page whilst we're on it,
1:13
S… Speaker 2 (289. Fixing a Bug with the Resolver)
but we can also,
1:15
S… Speaker 2 (289. Fixing a Bug with the Resolver)
of course, reload the app somewhere else and just fetch data.
1:17
S… Speaker 1 (289. Fixing a Bug with the Resolver)
But now,
1:18
S… Speaker 2 (289. Fixing a Bug with the Resolver)
if I edit this,
1:20
S… Speaker 1 (289. Fixing a Bug with the Resolver)
indeed,
1:21
S… Speaker 2 (289. Fixing a Bug with the Resolver)
the changes are saved.
1:23
S… Speaker 1 (289. Fixing a Bug with the Resolver)
If I reload,
1:24
S… Speaker 1 (289. Fixing a Bug with the Resolver)
then I then...
1:26
S… Speaker 2 (289. Fixing a Bug with the Resolver)
Get my old data because I didn't save them to the server before my
1:30
S… Speaker 2 (289. Fixing a Bug with the Resolver)
changes But they were saved locally and if I would have chosen save data,
1:34
S… Speaker 2 (289. Fixing a Bug with the Resolver)
we would have also saved up on a server So this is a tiny adjustment which we
1:38
S… Speaker 2 (289. Fixing a Bug with the Resolver)
should make to avoid strange bugs

यह व्याख्या एआई (अंग्रेजी भाषा की पहचान के द्वारा तैयार की गयी थी ।) एआई नीति

❤️ क्या आपको STT.ai पसंद है? अपने दोस्तों को बताइए!
सारांश
इस बुक का एआई सारांश बनाने के लिए सार बनाने के लिए सार को क्लिक करें.
साझा कर रहा है...
एआई के बारे में पूछें इस ट्रांसमिशन के बारे में
इस हस्तलिपि के बारे में कुछ सवाल पूछिए — एआई को ज़रूरी भागों और जवाब मिलेगा ।