yellowbox-react

YellowBox renders warnings at the bottom of the app being developed.

  • 所有者: iamdustan/yellowbox-react
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

React YellowBox

This is a direct port of React Native’s YellowBox developer tool to React.js.
Original source can be viewed at:
https://github.com/facebook/react-native/blob/master/Libraries/ReactIOS/YellowBox.js

YellowBox renders warnings at the bottom of the app being developed.

Warnings help guard against subtle yet significant issues that can impact the
quality of the app. This "in your face" style of warning allows developers to
notice and correct these issues as quickly as possible.

By default, the warning box is enabled when the NODE_ENV is not 'production'.
Set the following flag to disable it (and call console.warn to update any
rendered ):

  console.disableYellowBox = true;
  console.warn('YellowBox is disabled.');

Warnings can be ignored programmatically by setting the array:

  console.ignoredYellowBox = ['Warning: ...'];

Strings in console.ignoredYellowBox can be a prefix of the warning that
should be ignored.

Example Usage

import React from 'react';
import ReactDOM from 'react-dom';
import YellowBox from 'yellowbox-react';
import App from './your-app.js';

// ignore HMR (hot module replacement) warnings
console.ignoredYellowBox = ['[HMR]'];

ReactDOM.render((
  <div>
    <App />
    <YellowBox />
  </div>
), document.getElementById('app'));

Example Usage with React Blessed

import React from 'react';
import ReactBlessed from 'react-blessed';
import YellowBox from 'yellowbox-react/lib/blessed';
import blessed from 'blessed';

const screen = blessed.screen({
  autoPadding: true,
  smartCSR: true,
  title: 'react-blessed yellowbox',
});

screen.key(['escape', 'q', 'C-c'], function(ch, key) {
  return process.exit(0);
});

ReactBlessed.render((
  <element>
    <App />
    <YellowBox />
  </element>
), screen));

License

Copyright (c) 2015 Dustan Kasten, dustan.kasten@gmail.com
Licensed under the MIT license.

主要指标

概览
名称与所有者iamdustan/yellowbox-react
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证
所有者活动
创建于2015-12-01 19:00:09
推送于2019-08-18 17:42:08
最后一次提交2018-03-14 09:10:53
发布数6
最新版本名称v0.10.0 (发布于 2017-05-02 09:40:13)
第一版名称0.9.0 (发布于 2015-12-01 14:00:58)
用户参与
星数67
关注者数2
派生数8
提交数18
已启用问题?
问题数2
打开的问题数1
拉请求数6
打开的拉请求数1
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?