Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is defined in components/Error/Error.js. Generally, one does not have to use this component. The reason is each error page is standalone, i.e., when an error page is shown, the other components from the platform are not used at all. Therefore, Error component is used in Application.js (at the top level). This ensures that the developer need not remember to use Error component inside one of his other components. This Error component will be called automatically whenever the error property object in ErrorStore is set. Another thing to note about this component is that this component selects appropriate child error component (e.g., BadRequest, ServiceUnavailable etc.) based on the statusCode parameter set in error property object. This component is using select statement for finding the correct child component. Child component finally renders for showing to show the error page. If you want to change the layout or css of the error page, child component is the place for that.

...