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
I have an issue with the naming of our helper functions isNormal, isLoading etc.
The prefix is is where I have the issue. The function isNormal does not check if the status is exactly normal, instead checks to see if that status contains normal.
I think this helps communicate to our users that statuses are a collection of booleans vs a mutually exclusive state.
Manipulating a status (to force a certain status for the loader for example), currently requires some knowledge about bitwise operators which not great. Instead it would be better if we has manipulation methods like addNormal, removeNormal or similar.
Alternatively we could add a function addStatus(status, NORMAL) to reduce the API footprint.
The text was updated successfully, but these errors were encountered:
ricokahler
added
the
proposal
This contains a proposal for a feature or fix. This work may be subject to be discarded.
label
Oct 11, 2019
I have an issue with the naming of our helper functions
isNormal
,isLoading
etc.The prefix
is
is where I have the issue. The functionisNormal
does not check if the status is exactly normal, instead checks to see if that status contains normal.So let's rename it? 🤔
isNormal
=>hasNormal
I think this helps communicate to our users that statuses are a collection of booleans vs a mutually exclusive state.
Manipulating a status (to force a certain status for the loader for example), currently requires some knowledge about bitwise operators which not great. Instead it would be better if we has manipulation methods like
addNormal
,removeNormal
or similar.Alternatively we could add a function
addStatus(status, NORMAL)
to reduce the API footprint.The text was updated successfully, but these errors were encountered: