Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switching from React.PropTypes to prop-types #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alt-container",
"version": "1.0.2",
"version": "1.0.3",
"description": "A flux container for alt",
"main": "lib/AltContainer.js",
"scripts": {
Expand Down Expand Up @@ -29,7 +29,8 @@
},
"homepage": "https://github.com/altjs/container",
"dependencies": {
"object.assign": "^4.0.1"
"object.assign": "^4.0.1",
"prop-types": "^15.5.10"
},
"devDependencies": {
"alt": "0.17.4",
Expand Down
8 changes: 5 additions & 3 deletions src/AltContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
*
* Full docs available at http://goatslacker.github.io/alt/
*/
import React from 'react'
import PropTypes from 'prop-types';

import React from 'react';
import assign from 'object.assign'

const id = it => it
Expand Down Expand Up @@ -116,11 +118,11 @@ const getStateFromStores = (props) => {
// what about propTypes?
class AltContainer extends React.Component {
static contextTypes = {
flux: React.PropTypes.object,
flux: PropTypes.object,
}

static childContextTypes = {
flux: React.PropTypes.object,
flux: PropTypes.object,
}

getChildContext() {
Expand Down
5 changes: 3 additions & 2 deletions src/mixinContainer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*eslint-disable*/
import PropTypes from 'prop-types';
import assign from 'object.assign'

const id = it => it
Expand All @@ -23,11 +24,11 @@ const mixinContainer = (React) => {

return {
contextTypes: {
flux: React.PropTypes.object
flux: PropTypes.object
},

childContextTypes: {
flux: React.PropTypes.object
flux: PropTypes.object
},

getChildContext() {
Expand Down