v6.25.2
v6.25.2 (Patch Release)
Status: Released
This is a new patch release of the @alextheman/components package. It includes small, non-breaking changes and should require no refactoring. Please read the description of changes below.
Description of Changes
- Add explicit
undefinedchecks for the fallback components inQueryBoundary.- Previously we were just doing a falsy check to determine if we should render the component. (e.g.
if (errorComponent)). This would've skipped pastnull, which doesn't feel right as passing innullcan also mean that we don't want to render anerrorComponentat all. - This changes that so that we specifically check
if(errorComponent !== undefined)to determine whether or not to render the component. That way,nullmeans we want no fallback, andundefinedmeans that we want the default fallback.
- Previously we were just doing a falsy check to determine if we should render the component. (e.g.
- Change the default fallbacks in
QueryBoundaryNullable.- Instead of rendering an error alert, we now render a Typography. This makes it feel less like an error on the UI by default, as it may not always be treated that way.
- We also render different
null/undefinedmessages by default. Forundefined, we say the data isn't available, in the sense that the query didn't provide data at all, whereasnullmeans that the data was not found, in the sense that the query explicitly resolved with no result.