Ant Design antd vs antd-mobile for non-native mobile web development

ぐ巨炮叔叔 提交于 2019-11-30 08:08:56

问题


Reading about Ant Design I am getting confused about which library to use for mobile web development. There are two libraries, antd and antd-mobile. While it is clear that antd-mobile supports react-native on iOS and Android, it is unclear which one is best suited for plain mobile (non-native / SPA) web development.

Reading the antd introduction you see statements like "Ant Design which is specially created for internal desktop applications, ...", while reading the antd-mobile introduction you will see "Support Web / iOS / Android platform (Based on React Native)"

From this I would think that ant is somehow not very suitable for web development other than web based desktop (i.e. Elektron) apps.

But trying to build a normal web app with ant-mobile I couldn't get it to work. For example the Button is showing but DatePicker is not. Switching to ant everything seems to work fine.

Am I right to assume that for any non-native mobile development you need to use ant instead of ant-mobile?

If so, what is this supported "Web" platform that antd-mobile is mentioning?


回答1:


From my experience:

Antd:

Intended for full browser web only (or electron) development, they are no mobile first design, some cases you have to tweak to make you web page look good in mobile.

Antd-mobile:

Antd mobile exports 2 versions of components, the web one (which uses DOM) and the react native version (uses View, Text etc...)

Web version: You can think it's like jQuery Mobile, Sencha Touch etc, it's intended to build pure mobile web page/application, the application that you are going to see in a mobile browser. example, go and open facebook.com, amazon.com with a mobile browser (they look really different then the desktop one).

React Native version: You will use this to build a Mobile App (a hybrid app) that sits in Google Play store/App Store, an app that needs to be installed.

Hope it helps. If I made mistakes please let me know.



来源:https://stackoverflow.com/questions/46920892/ant-design-antd-vs-antd-mobile-for-non-native-mobile-web-development

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!