Skip to content

Commit a2d3585

Browse files
authored
Merge pull request #10 from brucewpaul/master
Update to use external prop-types package
2 parents 9035501 + 2e84dfc commit a2d3585

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
},
3030
"homepage": "https://github.com/altjs/container",
3131
"dependencies": {
32-
"object.assign": "^4.0.1"
32+
"object.assign": "^4.0.1",
33+
"prop-types": "^15.5.10"
3334
},
3435
"devDependencies": {
3536
"alt": "0.17.4",

src/AltContainer.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
* Full docs available at http://goatslacker.github.io/alt/
5757
*/
5858
import React from 'react'
59+
import PropTypes from 'prop-types';
5960
import assign from 'object.assign'
6061

6162
const id = it => it
@@ -116,11 +117,11 @@ const getStateFromStores = (props) => {
116117
// what about propTypes?
117118
class AltContainer extends React.Component {
118119
static contextTypes = {
119-
flux: React.PropTypes.object,
120+
flux: PropTypes.object,
120121
}
121122

122123
static childContextTypes = {
123-
flux: React.PropTypes.object,
124+
flux: PropTypes.object,
124125
}
125126

126127
getChildContext() {

src/mixinContainer.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*eslint-disable*/
22
import assign from 'object.assign'
3+
import PropTypes from 'prop-types';
34

45
const id = it => it
56

@@ -23,11 +24,11 @@ const mixinContainer = (React) => {
2324

2425
return {
2526
contextTypes: {
26-
flux: React.PropTypes.object
27+
flux: PropTypes.object
2728
},
2829

2930
childContextTypes: {
30-
flux: React.PropTypes.object
31+
flux: PropTypes.object
3132
},
3233

3334
getChildContext() {

0 commit comments

Comments
 (0)