Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stéphane Roucheray
Reactive-Architecture-and-UX-Patterns_Angular
Commits
3db042e9
Unverified
Commit
3db042e9
authored
May 16, 2020
by
MariaLazarova
Committed by
GitHub
May 16, 2020
Browse files
spelling-check-exercise
parent
340597d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
projects/combining-streams/src/lib/exercises/combineLatest/docs/combineLatest.exercise.md
View file @
3db042e9
...
...
@@ -8,13 +8,13 @@ _Over-fetching HTTP requests visualized_

This is a result of wrong state-management. To face this problem, we need to store the results of the HTTP Requests in
a shared cache. We can put this behavior inside a
`Service`
in order to share our state ac
c
ross multiple
`Components`
.
a shared cache. We can put this behavior inside a
`Service`
in order to share our state across multiple
`Components`
.

_Shared data store visualized_
For this exercise we introduce a very basic HTTP cache solution by using a
`BehaviorSubject`
as a shared data store. Instead
For this exercise
,
we introduce a very basic HTTP cache solution by using a
`BehaviorSubject`
as a shared data store. Instead
of binding
`Components`
directly to HTTP Requests, we will feed the data store with the results and provide
single shared
`Observables`
mapped from the data store.
...
...
@@ -79,7 +79,7 @@ constructor(...) {
## Exercise
Eliminate the HTTP requests from the
`Component`
an
y
make use of the shared Observables
`posts$`
and
`comments$`
.
Eliminate the HTTP requests from the
`Component`
an
d
make use of the shared Observables
`posts$`
and
`comments$`
.
Even though the data in our store gets updated properly, the
`Component`
won't be able to display the list of
`BlogPost`
anymore.
This is because
`posts$`
and
`comments$`
do not
`complete`
. Since
`forkJoin`
relies on its sources to complete, it won't
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment