which is better : themeGet(path,fallbackVal) vs props.theme.pNameJanuary 14, 2020 at 3:34am
Hello. I feel lost making the choice of the better way to get values from theme object.
themeGet(path,fallbackVal)is ok, but it needs to import a new method themeGet. Using
props.theme.pNameis ok too. And it doesn't need extra imports.
props.theme.pName || fallbackValalso support to declare fallback value.