I have a piece of code that should be rendered based on the condition applied. For example:
isMobile ? <MyComponent> : <div className={styles.myclassStyle}>
....other code goes here....
isMobile ? </MyComponent> : </div>
if isMobile is true, then MyComponent should be selected otherwise the html element
div . Is it possible to do so? Any alternate solution?