I'm having error with conditional rendering in Nextjs. If I have 1 component it works. With multiple components (block of code), it doesn't work
-> Its work:
const MyComponent = () => {
return (
<h1>Hello word</h1>
{ (isTrue) ? (
<Text>Component 1</Text>
) : 'No component'
}
)
}
-> DON'T work :(
const MyComponent = () => {
return (
<h1>Hello word</h1>
{ (isTrue) ? (
<Text>Component 1</Text>
<Text>Component 2</Text>
) : 'No component'
}
)
}