Live data from Hacker News

Ant Design – the second most popular React UI framework

github.com

11–20 of 67 posts

Re: Ant Design – the second most popular React UI framework

#11

Isn't there any UI framework alternative for the web that doesn't use JavaScript or Typescript? Something like DaisyUI but using other languages when needing interactivity. Also, tested the DatePicker and it's examples with time is unusable on mobile, renders outside of the viewport without option of scrolling.

There's https://tailwindui.com/?ref=top, from the Tailwind CSS people. They come with a "HTML" mode, which I think means no JS.

But if you need interactivity, on the web it has to be JS, because that's the only thing that can manipulate the DOM. (Edit: To be clear, there are frameworks that COMPILE to JS, so you the programmer don't have to work in JS yourself.) The alternative would be something like a server-updated Canvas where the UI is done outside of the DOM and not in the client, but even that would need some JS shims just to communicate and redraw the Canvas.

If you want to render the entire page serverside and handle all interactions via clicks and HTTP POSTs and such, you still can, of course. That would just be slower for the visitor.

Probably a "JS-lite" approach like HTMX + Alpine would be worth considering?

Re: Ant Design – the second most popular React UI framework

#13

Isn't there any UI framework alternative for the web that doesn't use JavaScript or Typescript? Something like DaisyUI but using other languages when needing interactivity. Also, tested the DatePicker and it's examples with time is unusable on mobile, renders outside of the viewport without option of scrolling.

I mean, you can use any compile to WASM language and framework like Flutter, Rust, .NET, all of which have their own UI libraries.

Re: Ant Design – the second most popular React UI framework

#15

How anyone finds this code maintainable is beyond me: https://github.com/ant-design/ant-design/blob/master/compone...

table components are typically the most complex. this is cleaner: https://github.com/ant-design/ant-design/blob/master/compone...

Re: Ant Design – the second most popular React UI framework

#17

How anyone finds this code maintainable is beyond me: https://github.com/ant-design/ant-design/blob/master/compone...

What's particularly wrong with it? Looks like pretty standard React, with some custom hooks imported, and clearly defined props.

If you start at the bottom, with the actual component (https://github.com/ant-design/ant-design/blob/master/compone...), the logic is much clearer. Most of the other consts are just definitions that you pass to the component (see documentation at https://ant.design/components/table#table).

And for the long list of imports and such, any modern IDE can parse those for you and easily jump to the source or the type defs.

If you're complaining about how this looks vs traditional OOP code, etc., that's just a stylistic choice Meta made for React codebases a few years back. It actually does make components pretty easy to maintain over the long term because all the core logic is just in one long, flat file. Lots of vertical scrolling, but predictable outcomes and easily refactored chunks. But third parties typically just have to mimic that style. That's not on Ant, that's just how JS code is currently in fashion...

Re: Ant Design – the second most popular React UI framework

#18
post #8
post #5

I've come across this library a lot but never used it. I did inherit a project that uses chakra-ui though and have very much enjoyed using it. This seems similar, has anyone used both and have a preference for one or the other?

I've always been afraid to use Ant because it's Chinese: https://github.com/ant-design Not necessarily just because of CCP shenanigans, but also US ones (like if an administration suddenly decides to impose software import restrictions). MUI is international (founded in France & UK: https://mui.com/about/ ), and Chakra is Nigerian ( https://v2.chakra-ui.com/ ) It saddens me that this matters in this day and age, but…

I ended up moving away from Ant on a project a few years back. It frustrated me that troubleshooting with specific code snippets would often bring me to Chinese-only Github issues / etc.

Re: Ant Design – the second most popular React UI framework

#19
I used antd at a previous company and I thought it was very nice from a design standpoint with a good look out of the box.

Development could be a little clunky with some things difficult to customize, although I think that's gotten somewhat better. I also remember a few things having Chinese documentation but missing some English translations. Haven't used it for a few years so not sure if that has been more filled in or if there are more English speaking maintainers involved now.

Still think it looks nice visually overall.

Post reply on HN