Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

removed react peer dependency, upgraded to new react and helpers version #25

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = extend(common, {
module: {
loaders: common.loaders.concat([{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['react-hot', 'jsx-loader?harmony'],
}])
}
Expand Down
5 changes: 3 additions & 2 deletions demos/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ require('./demo.css');


var React = require('react'),
App = require('./app');
App = require('./app'),
ReactDOM = require('react-dom');


React.render(<App />, document.body);
ReactDOM.render(<App />, document.body);
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
"email": "[email protected]"
},
"main": "dist/react-json-editor.js",
"peerDependencies": {
"react": ">=0.12.2 <1.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/ismaelga/react-json-editor.git"
Copy link
Owner

Choose a reason for hiding this comment

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

I think we should go with "react": "^0.14.0 || ^15.0.0" instead of removing it completely.

Copy link
Author

Choose a reason for hiding this comment

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

@ismaelga ok, can I ask why we need a peer dependency? Is it due to lumc-nested/nested-editor#54?

Do we use lumc-nested/nested-editor?

Overall I love this project by the way. Very comprehensive.

Copy link

@jahed jahed Aug 25, 2016

Choose a reason for hiding this comment

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

@newbreedofgeek Projects using react-json-editor will already have their own React and this module will need to support that version rather than use its own. Hence it's a peer dependency.

Also it avoids having multiple versions of the same module being bundled in the same project.

Choose a reason for hiding this comment

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

@jahed Ack on the peer dependency. Whats the status of this? I'm from the https://github.com/lumc-nested/nested-editor team as referenced above and we would like to move to React 15.

Copy link

Choose a reason for hiding this comment

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

@marksantcroos I ended up dropping my dependency on this project. Though, last I checked, the change @ismaelga suggested worked fine, so you can probably fork the repo, make the change and use the fork. Or submit a PR and hope this repo is still being maintained.

Choose a reason for hiding this comment

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

@jahed Thanks for your reply. I will indeed do what you and @ismaelga suggested and create a new PR. For my interest, what did you end up replacing it with?
@ismaelga Are you yourself still dependent on this project?

Copy link
Owner

Choose a reason for hiding this comment

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

Hi guys! I haven't given the proper attention to this repo since I don't use it anymore and also because there is a great alternative now https://github.com/mozilla-services/react-jsonschema-form

That said. I will try to give attention to the open issues some day soon. And make sure it works with latest React version

Expand All @@ -48,10 +45,10 @@
"jsx-loader": "^0.12.2",
"marked": "^0.3.3",
"purecss": "^0.5.0",
"react": "^0.14.6",
"react-addons-test-utils": "^0.14.6",
"react-addons-update": "^0.14.6",
"react-dom": "^0.14.6",
"react": "^15.0.2",
"react-addons-test-utils": "^15.0.2",
"react-addons-update": "^15.0.2",
"react-dom": "^15.0.2",
"react-ghfork": "^0.3.0",
"react-hot-loader": "^1.1.6",
"style-loader": "^0.8.3",
Expand Down