使用 React DevTools 调试小程序是什么体验?

固然,React DevTools 是无法用来直接调试小程序的。react

可是利用 Remax 小程序框架,咱们就能够作到利用 React DevTools 来调试了。npm

Remax 是一个基于真正 React 开发的小程序框架, https://remaxjs.org

首先新建一个 Remax 项目(以阿里小程序为例):小程序

$ npx create-remax-app hello-remax
$ cd hello-remax
$ npm install

安装 React DevTools 并启动:bash

$ npm install react-devtools -g
$ react-devtools

使用小程序开发者工具打开 hello-remax 目录,等待小程序编译完成,就能在 React Devtools 进行调试啦。app

相关文章
相关标签/搜索