mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-18 04:24:19 +08:00
Use prop-types package (#2029)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
"chai": "3.5.0",
|
||||
"jsdom": "9.8.3",
|
||||
"mocha": "3.2.0",
|
||||
"prop-types": "15.5.6",
|
||||
"test-integrity": "1.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes, createElement } from 'react';
|
||||
import React, { Component, createElement } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class BuiltEmitter extends Component {
|
||||
static propTypes = {
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import load from 'absoluteLoad';
|
||||
|
||||
export default class extends Component {
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load() {
|
||||
return [[1, '1'], [2, '2'], [3, '3'], [4, '4']];
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load(users) {
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
async function load() {
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export default class extends Component {
|
||||
static propTypes = {
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load(prefix) {
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const styled = ([style]) =>
|
||||
style
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load(id = 0) {
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
async function load() {
|
||||
return {
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function* load(limit) {
|
||||
let i = 1;
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load() {
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load(baseUser) {
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load() {
|
||||
return Promise.resolve([
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load({ id, ...rest } = { id: 0, user: { id: 42, name: '42' } }) {
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load({ id = 0, ...rest }) {
|
||||
return [
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function load(name) {
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user