componentsdirectory. Call it
error.jsand put this code in the file:
<Root>component. First we import the
<Error>component, then we add it as the last item in our
<Switch>component which selects what component to use depending on the first matching condition.
<Error>component will display informing the user of the error.