I have 2 components, one that I wish to display if the browser is Mobile, the other if it is tablet/desktop.
@if(isMobile)
{
<MobileComponent />
}
else
{
<DesktopComponent />
}
I am looking to not have the Mobile Component in the DOM at all when on desktop and vice versa so i dont want to do a CSS visibility. Id rather only the one be rendered. What is the best approach to determine if the browser is a Mobile browser so I can set isMobile accordingly?