Describe the bug
This pattern causes hydration mismatch:
function Badge(props: { required?: boolean; optional?: boolean }) {
return (
<Show
when={props.required ? 'Required' : props.optional ? 'Optional' : null}
>
{(text) => <span>{text()}</span>}
</Show>
);
}
Your Example Website or App
https://stackblitz.com/edit/nitrojs-nitro-x1i4tv9d?file=src%2Fapp.tsx
Steps to Reproduce the Bug or Issue
- Go to the link above
- See console logs
Expected behavior
No issue
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
Related: #2959
Describe the bug
This pattern causes hydration mismatch:
Your Example Website or App
https://stackblitz.com/edit/nitrojs-nitro-x1i4tv9d?file=src%2Fapp.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
No issue
Screenshots or Videos
No response
Platform
Additional context
Related: #2959