green6060/digicert-public-library-demo

coding pattern

Opened this issue · 0 comments

there's actually a great coding pattern that you should follow for cases like this instead of trying to do ternaries...
if(what I want doesn't exist or i am waiting on a fetch) return

return

Much cleaner to read, putting the spinner in its own component also makes it reusable on other pages, declutters this component.
ternaries are cool.... but the return already ends your code so it's unneeded.