Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

var React = require('react'),
PropTypes = require('prop-types'),
createReactClass = require('create-react-class'),
withSideEffect = require('react-side-effect');

function reducePropsToState(propsList) {
Expand All @@ -17,11 +19,11 @@ function handleStateChangeOnClient(title) {
}
}

var DocumentTitle = React.createClass({
var DocumentTitle = createReactClass({
displayName: 'DocumentTitle',

propTypes: {
title: React.PropTypes.string.isRequired
title: PropTypes.string.isRequired
},

render: function render() {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"react": "^0.13.0"
},
"dependencies": {
"create-react-class": "^15.5.1",
"prop-types": "^15.5.6",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be in peerDependencies ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. I guess you would pull in react as a peer dependency as users would actively want to provide their own copy of it, but is that the case with these two? react they definitely would have installed anyway, but might not use prop-types or create-react-class, which they then have to install manually and include in their project dependencies (as it goes with peerDependencies). Can you explain why you think they should be peerDependencies?

Copy link
Copy Markdown

@avocadowastaken avocadowastaken Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but might not use prop-types or create-react-class

I guess it's true

Can you explain why you think they should be peerDependencies?

I just don't think that this lib is big enough to be "batteries included" type.


Anyways I guess @gaearon does not have time or ambitions to maintain this project, so it's time to move on.

Copy link
Copy Markdown
Owner

@gaearon gaearon Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it should be in dependencies.

I'm happy to add maintainers who won't change the API (I don't think it's worth changing it at this point to avoid churn in a very simple library). If you'd like to help with maintenance let me know.

"react-side-effect": "^1.0.2"
}
}