Home >Web Front-end >uni-app >Can the two versions of uniapp be hot updated?
UniApp is an open source cross-platform application framework that supports web, mobile applications, mini programs and quick applications written based on Vue.js. During the development process, problems between the two versions may arise, namely the difference between the mini program and the H5 version. So can the two versions of UniApp be hot updated?
UniApp adopts an idea called "one code, multiple terminals", that is, one source code can run on different platforms, which can save time and cost during the development process. However, according to the differences between different platforms, although the source code is the same, the code corresponding to the platform will be generated during packaging. Therefore, there are differences in the codes of H5 and mini program versions.
From the perspective of hot updates, UniApp supports hot updates between mini programs and H5 versions. Its mechanism is to add the updated code to the original code in the form of a patch without the need to re-download the entire application, which can greatly save update traffic and time.
UniApp's hot update mechanism can realize hot updates between the mini program and the H5 version. However, it should be noted that some functions of the mini program and the H5 version are different. For example, the mini program version cannot call the catchActionSheetClick method. H5 Versions are available and should be differentiated when necessary.
In addition, if you need to implement hot updates between the mini program and the H5 version, the following two conditions need to be met:
In general, UniApp’s hot update mechanism can well implement hot updates between mini programs and H5 versions, but it needs to be used rationally to avoid excessive functional differences and code changes. caused problems.
The above is the detailed content of Can the two versions of uniapp be hot updated?. For more information, please follow other related articles on the PHP Chinese website!