logoalt Hacker News

robertoandredyesterday at 5:17 PM1 replyview on HN

> the code he is displaying is definitely idiomatic React

It's really not. There's nothing, for example, stopping you from using <dialog> in React. It works perfectly fine and can integrate with any state or event manager if you want it to.

What he's doing is comparing brand-new web features that don't have good support yet with long-standing solutions that were needed years before those web features were a glimmer in anyone's eye.


Replies

lelanthranyesterday at 6:13 PM

>> 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.

show 3 replies