If you clone the repo and go to "end of 6" and run the project you'll get a hydration error.
button.tsx:53 A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
- A server/client branch `if (typeof window !== 'undefined')`.
- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
https://react.dev/link/hydration-mismatch
...
<div>
...
<PopoverProvider scope={undefined} contentId="radix-«R1je»" triggerRef={{current:null}} open={false} ...>
<PopoverTrigger asChild={true}>
<PopoverTrigger data-slot="popover-tr..." asChild={true}>
<PopperAnchor asChild={true} __scopePopper={{Popper:[...]}}>
<Primitive.div asChild={true} ref={function}>
<Primitive.div.Slot ref={function}>
<Primitive.div.SlotClone ref={function}>
<Primitive.button type="button" aria-haspopup="dialog" aria-expanded={false} ...>
<Primitive.button.Slot type="button" aria-haspopup="dialog" aria-expanded={false} ...>
<Primitive.button.SlotClone type="button" aria-haspopup="dialog" aria-expanded={false} ...>
<Button variant="outline" className="w-[280px] ..." type="button" aria-haspopup="dialog" ...>
<button
data-slot="popover-trigger"
className={"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm trans..."}
type="button"
aria-haspopup="dialog"
aria-expanded={false}
+ aria-controls="radix-«R1je»"
- aria-controls="radix-«Rpn6»"
data-state="closed"
onClick={function handleEvent}
ref={function}
>
...
...
<SelectCollectionProvider scope={undefined}>
<SelectCollectionProviderProvider scope={undefined} itemMap={Map} collectionRef={{current:null}}>
<SelectProvider scope={undefined} onNativeOptionAdd={function} onNativeOptionRemove={function}>
<SelectTrigger>
<SelectTrigger data-slot="select-tri..." data-size="default" className={"border-i..."}>
<PopperAnchor asChild={true} __scopePopper={{Popper:[...]}}>
<Primitive.div asChild={true} ref={function}>
<Primitive.div.Slot ref={function}>
<Primitive.div.SlotClone ref={function}>
<Primitive.button type="button" role="combobox" aria-controls="radix-«Rle»" ...>
<button
type="button"
role="combobox"
+ aria-controls="radix-«Rle»"
- aria-controls="radix-«Ran6»"
aria-expanded={false}
aria-required={undefined}
aria-autocomplete="none"
dir="ltr"
data-state="closed"
disabled={false}
data-disabled={undefined}
data-placeholder=""
data-slot="select-trigger"
data-size="default"
className={"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='t..."}
onClick={function handleEvent}
onPointerDown={function handleEvent}
onKeyDown={function handleEvent}
ref={function}
>
...
...
...
If you clone the repo and go to "end of 6" and run the project you'll get a hydration error.