Best way to handle many possible components to render?
I just ask this on twitter, but what would be your approach to it, imagine:
U have a page, that calls a hooks, that loads your data, ok.
The return of the hooks is:
Now if some error happens i show one component, if islaoding u show another.
If data is
data.x
u show <ComponentX/>
if is data.y
u show <ComponentY />
basically u have 4 possibly component to be showed in your page3 Replies
just like this
oh yeah, but i mean, inside another component, i'm searching better way than using many
and etc
hmm not sure what you're looking for, these are the ways to do conditional rendering
if else / switch / && etc
possibly consider refactoring your components if viable