Kaynağa Gözat

Start the switch to prop-types

As https://facebook.github.io/react/docs/typechecking-with-proptypes.html
says, React.PropTypes have moved into the npm package prop-types since
React v15.5. I've already failed to update certain devDependencies
because they mandate the use of prop-types so I'd rather we (gradually
at least) move to prop-types rather than face a lot of work later on.
master
Lyubo Marinov 8 yıl önce
ebeveyn
işleme
571958cf26

+ 1
- 0
package.json Dosyayı Görüntüle

51
     "lodash": "4.17.4",
51
     "lodash": "4.17.4",
52
     "nuclear-js": "1.4.0",
52
     "nuclear-js": "1.4.0",
53
     "postis": "2.2.0",
53
     "postis": "2.2.0",
54
+    "prop-types": "15.5.10",
54
     "react": "15.6.1",
55
     "react": "15.6.1",
55
     "react-dom": "15.6.1",
56
     "react-dom": "15.6.1",
56
     "react-i18next": "4.8.0",
57
     "react-i18next": "4.8.0",

+ 6
- 5
react/features/app/components/AbstractApp.js Dosyayı Görüntüle

1
+import PropTypes from 'prop-types';
1
 import React, { Component } from 'react';
2
 import React, { Component } from 'react';
2
 import { I18nextProvider } from 'react-i18next';
3
 import { I18nextProvider } from 'react-i18next';
3
 import { Provider } from 'react-redux';
4
 import { Provider } from 'react-redux';
39
          * The default URL {@code AbstractApp} is to open when not in any
40
          * The default URL {@code AbstractApp} is to open when not in any
40
          * conference/room.
41
          * conference/room.
41
          */
42
          */
42
-        defaultURL: React.PropTypes.string,
43
+        defaultURL: PropTypes.string,
43
 
44
 
44
         /**
45
         /**
45
          * (Optional) redux store for this app.
46
          * (Optional) redux store for this app.
46
          */
47
          */
47
-        store: React.PropTypes.object,
48
+        store: PropTypes.object,
48
 
49
 
49
         /**
50
         /**
50
          * The URL, if any, with which the app was launched.
51
          * The URL, if any, with which the app was launched.
51
          */
52
          */
52
-        url: React.PropTypes.oneOfType([
53
-            React.PropTypes.object,
54
-            React.PropTypes.string
53
+        url: PropTypes.oneOfType([
54
+            PropTypes.object,
55
+            PropTypes.string
55
         ])
56
         ])
56
     };
57
     };
57
 
58
 

Loading…
İptal
Kaydet