文档模板:v0.4.1
react-native-restart
本项目基于 react-native-restart 开发。
该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:@react-native-ohos/react-native-restart 版本所属关系如下:
| 三方库名称 | 三方库版本 | 发布信息 | 支持RN版本 | Autolink | 编译API版本 | 社区基线版本 | npm地址 |
|---|---|---|---|---|---|---|---|
| @react-native-ohos/react-native-restart | ~0.2.0(开发中) | Gitcode Releases | 0.82.* | 是 | API12+ | 0.0.27 | Npm Address |
| @react-native-ohos/react-native-restart | ~0.1.0 | Gitcode Releases | 0.77.* | 否 | API12+ | 0.0.27 | Npm Address |
| @react-native-ohos/react-native-restart | ~0.0.28 | Gitcode Releases | 0.72.* | 是 | API12+ | 0.0.27 | Npm Address |
| @react-native-oh-tpl/react-native-restart | <=0.0.27-0.0.3@deprecated | Github Releases(deprecated) | 0.72.* | 否 | API12+ | 0.0.27 | Npm Address |
简介
react-native-restart 是 React Native 生态中一个轻量且关键的原生模块(Native Module)。它的核心功能是在应用运行时,强制重启整个 React Native 应用进程,从而实现类似“热重启”(Hot Restart)的效果。
下载安装
进入到工程目录并输入以下命令:
npm
npm install @react-native-ohos/react-native-restart
yarn
yarn add @react-native-ohos/react-native-restart