【文件属性】:
文件名称:konsul:浏览器开发控制台的React渲染器
文件大小:361KB
文件格式:ZIP
更新时间:2021-02-20 15:46:14
react console browser devtools JavaScript
Konsul是React渲染器随附的浏览器console的抽象。 它在浏览器开发人员控制台内提供文本样式,图像,样式继承,具有单击交互功能的按钮等。
用法
与React
使用npm安装konsul和react-konsul :
npm install konsul react-konsul react
以下代码演示了如何将konsul与react结合使用。
import createKonsul from 'konsul' ;
import renderToKonsul from 'react-konsul' ;
// Create an instance of konsul
const konsul = createKonsul ( ) ;
// Render react elements to the browser console!
renderToKonsul ( < text