We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
• 渲染方式与h5不同,小程序一般是通过Native原生渲染的,但是小程序同时也支持web渲染,如果使用web渲染的方式,我们需要初始化一个webview组件,然后在webview中加载h5页面;
所以当我们开发一个小程序时,通常会使用hybrid的方式,即会根据具体情况选择部分功能用小程序原生的代码来开发,部分功能通过webview加载h5页面来实现。Native与Web渲染混合使用,以实现项目的最优解;
这里值得注意的是,小程序下,native方式通常情况下性能要优于web方式。
• 小程序特有的双线程设计。h5下我们所有资源通常都会打到一个bundle.js文件里(不考虑分包加载),而小程序编译后的结果会有两个bundle,index.js封装的是小程序项目的view层,以及index.worker.js封装的是项目的业务逻辑,在运行时,会有两条线程来分别处理这两个bundle,一个是主渲染线程,它负责加载并渲染index.js里的内容,另外一个是Service Worker线程,它负责执行index.worker.js里封装的业务逻辑,这里面会有很多对底层api调用。
花名黄昱
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: