Home > Web Front-end > Front-end Q&A > Can react be made mobile?

Can react be made mobile?

藏色散人
Release: 2022-12-29 10:53:32
Original
2840 people have browsed it

react can be used on the mobile side and is also suitable for the mobile side, but it is not suitable for the PC side; because using React on the PC side requires redoing many existing components, including but not limited to highCharts chart class and dataPicker basic components, while mobile Web apps do not need such complex components, which brings opportunities to rewrite components when writing mobile projects.

Can react be made mobile?

The operating environment of this tutorial: Windows 10 system, react18.0.0 version, Dell G3 computer.

Can react be made mobile?

react can be used on the mobile side and is suitable for the mobile side, but not for the PC side.

Reasons:

1. Using React on the PC side requires redoing many existing components, including but not limited to highCharts chart class and dataPicker basic components.

2. Mobile web apps do not require such complex components, which brings opportunities for mobile projects to rewrite components.

The PC side requires SEO, but the mobile side basically does not need it, so it is possible to use this kind of data to load the framework later.

3. The basic library React es6 Route redux tappable compiled with webpack costs less than 200k after minify and about 50k after gzip. So clearly speaking, it is suitable for mobile terminals.

4. Whether it is using strong caching of etag or Expires, or using localStorage for caching. The 50k basic library accessed for the first time is not the fatal injury to 2g users. The fatal injury to 2g is the huge RTT time. With React, there is basically no need for zepto. There is no need for zepto after 13k gzip, and there is one less template engine to use.

5. After using es6, the code will become larger when compiled, but obviously these tens of kilobytes are not a reason to prevent the use of React.

You can try out the homepage of the city service in the WeChat wallet. I just tried React and it can basically be done in seconds. I will push it to other WeChat business projects in the future.

Recommended learning: "react video tutorial"

The above is the detailed content of Can react be made mobile?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template