React

12-30 1,023 views

react
making-react-reactive-pursuit-high-performing-easily-maintainable-react-apps

disable warning

// eslint-disable-next-line to ignore next line
/* eslint-disable */ to ignore all warnings in a file

Problem

Object doesn't support property or method 'startsWith' fixed
You'll need to implement .startsWith yourself. Here is the polyfill:

if (!String.prototype.startsWith) {
  String.prototype.startsWith = function(searchString, position) {
    position = position || 0;
    return this.indexOf(searchString, position) === position;
  };
}

React-Scripts

use jsx

replace react-scripts\conifg\paths.js src/index.js to src/index.jsx

use css-loader

开启后会对其他组件有影响,不建议这样干
How to Use CSS Modules with Create React App

use no-standard react scripts

https://github.com/firstlookmedia/react-scripts

react-native

https://www.jianshu.com/p/22aa14664cf9?open_source=weibo_search

阅读全文

react-virtualized

https://github.com/bvaughn/react-virtualized

阅读全文

欢迎留言