Comment by lelanthran
Comment by lelanthran 14 hours ago
>> the code he is displaying is definitely idiomatic React
> It's really not.
Of the React projects I've seen (including a ton on github), none of them used the browsers dialog without a React wrapper.
A quick search on google for a React project using `<dialog>` found none. Similar for github.
If you have an example, I'd like to see a link, because I'm skeptical that React projects are using `<dialog>` without wrapping it in React.
I'm not sure what you're searching for or what you consider "wrapping it in React". You need some sort of JS to open and close it.
const Modal = ({ isOpen, onRequestClose, ...rest }: ComponentProps<"dialog"> & { isOpen: boolean; onRequestClose: () => unknown; }) => {
};