-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
62 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
/** | ||
* Created by guoguangyu on 2016/10/25. | ||
*/ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import {Router, Route, browserHistory} from 'react-router'; | ||
import Main from './main'; | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import { BrowserRouter, Route } from "react-router-dom"; | ||
import Main from "./main"; | ||
|
||
ReactDOM.render(( | ||
<Router history={browserHistory}> | ||
ReactDOM.render( | ||
<BrowserRouter> | ||
<Route path="/" component={Main} /> | ||
</Router>), | ||
document.querySelector('#wrapper') | ||
</BrowserRouter>, | ||
document.querySelector("#wrapper") | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
/** | ||
* Created by guoguangyu on 2016/10/25. | ||
*/ | ||
import React, {Component} from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import JsonDiffReact from '../../src/jsondiff-for-react'; | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
import JsonDiffReact from "../../src/jsondiff-for-react"; | ||
|
||
class Main extends Component { | ||
static propTypes = { | ||
children: PropTypes.object, | ||
}; | ||
render() { | ||
const left = {a: 1}; | ||
const right = undefined; | ||
return (<JsonDiffReact left={left} right={right} />); | ||
const left = { a: 1, c: 1 }; | ||
const right = { a: 1, b: 2 }; | ||
return <JsonDiffReact left={left} right={right} />; | ||
} | ||
} | ||
export default Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5230,20 +5230,19 @@ rcfinder@^0.1.8: | |
dependencies: | ||
lodash.clonedeep "^4.3.2" | ||
|
||
react-dom@^16.13.1: | ||
version "16.13.1" | ||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f" | ||
integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag== | ||
react-dom@^17.0.2: | ||
version "17.0.2" | ||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" | ||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== | ||
dependencies: | ||
loose-envify "^1.1.0" | ||
object-assign "^4.1.1" | ||
prop-types "^15.6.2" | ||
scheduler "^0.19.1" | ||
scheduler "^0.20.2" | ||
|
||
react-hot-loader@^4.12.21: | ||
version "4.12.21" | ||
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.21.tgz#332e830801fb33024b5a147d6b13417f491eb975" | ||
integrity sha512-Ynxa6ROfWUeKWsTHxsrL2KMzujxJVPjs385lmB2t5cHUxdoRPGind9F00tOkdc1l5WBleOF4XEAMILY1KPIIDA== | ||
react-hot-loader@^4.13.0: | ||
version "4.13.0" | ||
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.13.0.tgz#c27e9408581c2a678f5316e69c061b226dc6a202" | ||
integrity sha512-JrLlvUPqh6wIkrK2hZDfOyq/Uh/WeVEr8nc7hkn2/3Ul0sx1Kr5y4kOGNacNRoj7RhwLNcQ3Udf1KJXrqc0ZtA== | ||
dependencies: | ||
fast-levenshtein "^2.0.6" | ||
global "^4.3.0" | ||
|
@@ -5269,7 +5268,20 @@ react-map-styles@^0.3.0: | |
resolved "https://registry.yarnpkg.com/react-map-styles/-/react-map-styles-0.3.0.tgz#f5bea50752412358e58bc019019e530bb2897202" | ||
integrity sha1-9b6lB1JBI1jli8AZAZ5TC7KJcgI= | ||
|
||
react-router@^5.2.0: | ||
react-router-dom@^5.2.0: | ||
version "5.2.0" | ||
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.2.0.tgz#9e65a4d0c45e13289e66c7b17c7e175d0ea15662" | ||
integrity sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA== | ||
dependencies: | ||
"@babel/runtime" "^7.1.2" | ||
history "^4.9.0" | ||
loose-envify "^1.3.1" | ||
prop-types "^15.6.2" | ||
react-router "5.2.0" | ||
tiny-invariant "^1.0.2" | ||
tiny-warning "^1.0.0" | ||
|
||
[email protected]: | ||
version "5.2.0" | ||
resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.0.tgz#424e75641ca8747fbf76e5ecca69781aa37ea293" | ||
integrity sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw== | ||
|
@@ -5285,14 +5297,13 @@ react-router@^5.2.0: | |
tiny-invariant "^1.0.2" | ||
tiny-warning "^1.0.0" | ||
|
||
react@^16.13.1: | ||
version "16.13.1" | ||
resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" | ||
integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== | ||
react@^17.0.2: | ||
version "17.0.2" | ||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" | ||
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== | ||
dependencies: | ||
loose-envify "^1.1.0" | ||
object-assign "^4.1.1" | ||
prop-types "^15.6.2" | ||
|
||
[email protected]: | ||
version "1.0.7" | ||
|
@@ -5640,10 +5651,10 @@ sax@~1.2.1, sax@~1.2.4: | |
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" | ||
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== | ||
|
||
scheduler@^0.19.1: | ||
version "0.19.1" | ||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" | ||
integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== | ||
scheduler@^0.20.2: | ||
version "0.20.2" | ||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" | ||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== | ||
dependencies: | ||
loose-envify "^1.1.0" | ||
object-assign "^4.1.1" | ||
|