useError
- Description
- Params and Return
- Example
Hook to determine if an error should be shown for a given screen id
Param / Return | Description |
---|---|
param | currentScreenID: the id of the screen being check for errors |
returns | boolean to show the error |
How to use the useError component
if (useError(ScreenIDTypesConstants.DISABILITY_RATING_SCREEN_ID)) {
return <ErrorComponent screenID={ScreenIDTypesConstants.DISABILITY_RATING_SCREEN_ID} />
}>