You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Carlos Alba edited this page Nov 21, 2020
·
1 revision
nullthrows
This is a simple utility function that throws an error when a value is
null and can be used to null check values.
Best practice:
Using this function at higher levels component parents,
sources of data or directly where a nullish (possibly null) value
is being pulled from is best. You don't want redundant or pointless
nullthrows usages at lower levels (children) as a side note the earlier you
can catch problems the better.