Exercise - Finalize Operator
Exercise
- Open exercise on codesandbox.
This exercise builds on the previous exercise using the
catchError()
operator.
Note that I've added a new message
constant variable that is a reference to an HTMLDivElement
that displays an error message.
By default, the div element is hidden using the hidden
class on the element.
In the catchError()
method I have removed the hidden
class.
- Your task is to use the
finalize()
operator to add the hidden
class back to the div element after 5000 milliseconds.