redux-router-kit
Advanced tools
Comparing version 0.0.56 to 1.0.0
@@ -42,3 +42,2 @@ 'use strict'; | ||
propTypes: { | ||
@@ -62,13 +61,11 @@ routes: _propTypes2.default.object.isRequired | ||
return _react2.default.createElement( | ||
'div', | ||
null, | ||
_react2.default.createElement(_Router2.default, _extends({}, this.props, { router: router })), | ||
_react2.default.createElement(_History2.default, { | ||
history: this.props.history, | ||
url: url, state: state, replace: replace, | ||
isWaiting: !!router.next, | ||
onChange: this.onChangeAddress | ||
}) | ||
); | ||
return [_react2.default.createElement(_Router2.default, _extends({ key: 'router' }, this.props, { router: router })), _react2.default.createElement(_History2.default, { | ||
key: 'history', | ||
history: this.props.history, | ||
url: url, | ||
state: state, | ||
replace: replace, | ||
isWaiting: !!router.next, | ||
onChange: this.onChangeAddress | ||
})]; | ||
} | ||
@@ -75,0 +72,0 @@ }); |
@@ -825,3 +825,2 @@ 'use strict'; | ||
propTypes: { | ||
@@ -845,13 +844,11 @@ routes: PropTypes.object.isRequired | ||
return React.createElement( | ||
'div', | ||
null, | ||
React.createElement(Router, _extends({}, this.props, { router: router })), | ||
React.createElement(History, { | ||
history: this.props.history, | ||
url: url, state: state, replace: replace, | ||
isWaiting: !!router.next, | ||
onChange: this.onChangeAddress | ||
}) | ||
); | ||
return [React.createElement(Router, _extends({ key: 'router' }, this.props, { router: router })), React.createElement(History, { | ||
key: 'history', | ||
history: this.props.history, | ||
url: url, | ||
state: state, | ||
replace: replace, | ||
isWaiting: !!router.next, | ||
onChange: this.onChangeAddress | ||
})]; | ||
} | ||
@@ -858,0 +855,0 @@ }); |
{ | ||
"name": "redux-router-kit", | ||
"version": "0.0.56", | ||
"version": "1.0.0", | ||
"description": "Routing tools for React+Redux", | ||
@@ -39,8 +39,8 @@ "main": "lib/index.js", | ||
"babel-register": "^6.7.2", | ||
"create-react-class": "^15.6.2", | ||
"eslint": "^2.5.3", | ||
"eslint-plugin-react": "^4.2.3", | ||
"jsdom": "^8.2.0", | ||
"react": "^0.14.8", | ||
"react-addons-test-utils": "^0.14.8", | ||
"react-dom": "^0.14.8", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0", | ||
"react-redux": "^4.4.1", | ||
@@ -53,3 +53,2 @@ "redux": "^3.3.1", | ||
"dependencies": { | ||
"create-react-class": "^15.6.2", | ||
"history": "^2.0.1", | ||
@@ -62,4 +61,4 @@ "path-to-regexp": "^1.2.1", | ||
"peerDependencies": { | ||
"react": ">= 0.14", | ||
"react-dom": ">= 0.14" | ||
"react": ">= 16.0.0", | ||
"react-dom": ">= 16.0.0" | ||
}, | ||
@@ -66,0 +65,0 @@ "ava": { |
@@ -7,2 +7,4 @@ # Redux Router Kit | ||
**Version 1.0.0 _requires_ React 16+** | ||
## Features | ||
@@ -73,3 +75,3 @@ | ||
const Root = React.createClass({ | ||
const Root = createReactClass({ | ||
render() { | ||
@@ -471,3 +473,3 @@ return ( | ||
```js | ||
const Home = React.createClass({ | ||
const Home = createReactClass({ | ||
render() { | ||
@@ -474,0 +476,0 @@ return <div>Home</div>; |
@@ -16,5 +16,4 @@ /** | ||
const RouterHistoryContainer = createReactClass({ | ||
propTypes: { | ||
routes: PropTypes.object.isRequired | ||
routes: PropTypes.object.isRequired, | ||
}, | ||
@@ -25,3 +24,3 @@ | ||
state, | ||
isHistoryChange: true | ||
isHistoryChange: true, | ||
}); | ||
@@ -37,16 +36,17 @@ }, | ||
return ( | ||
<div> | ||
<Router {...this.props} router={router}/> | ||
<History | ||
history={this.props.history} | ||
url={url} state={state} replace={replace} | ||
isWaiting={!!router.next} | ||
onChange={this.onChangeAddress} | ||
/> | ||
</div> | ||
); | ||
} | ||
return [ | ||
<Router key="router" {...this.props} router={router} />, | ||
<History | ||
key="history" | ||
history={this.props.history} | ||
url={url} | ||
state={state} | ||
replace={replace} | ||
isWaiting={!!router.next} | ||
onChange={this.onChangeAddress} | ||
/>, | ||
]; | ||
}, | ||
}); | ||
export default connectRouter(RouterHistoryContainer); |
@@ -15,2 +15,3 @@ import test from 'ava'; | ||
import RouterHistoryContainer from 'redux-router-kit/src/components/RouterHistoryContainer'; | ||
import createReactClass from 'create-react-class'; | ||
@@ -32,3 +33,3 @@ const reducer = combineReducers({ | ||
const Home = React.createClass({ | ||
const Home = createReactClass({ | ||
componentDidMount() { | ||
@@ -133,3 +134,3 @@ const homeNode = node.childNodes[0]; | ||
const Home = React.createClass({ | ||
const Home = createReactClass({ | ||
componentDidMount() { | ||
@@ -175,3 +176,3 @@ }, | ||
const Home = React.createClass({ | ||
const Home = createReactClass({ | ||
componentDidMount() { | ||
@@ -230,3 +231,3 @@ const { router } = this.props; | ||
const TodoApp = React.createClass({ | ||
const TodoApp = createReactClass({ | ||
render() { | ||
@@ -237,3 +238,3 @@ return <div>{this.props.children}</div>; | ||
const TodoEditor = React.createClass({ | ||
const TodoEditor = createReactClass({ | ||
render() { | ||
@@ -284,3 +285,3 @@ return <div className="todo">{this.props.params.id}</div>; | ||
const TodoApp = React.createClass({ | ||
const TodoApp = createReactClass({ | ||
render() { | ||
@@ -291,3 +292,3 @@ return <div>{this.props.todo}</div>; | ||
const TodoEditor = React.createClass({ | ||
const TodoEditor = createReactClass({ | ||
render() { | ||
@@ -294,0 +295,0 @@ return <div className="todo">{this.props.params.id}</div>; |
@@ -13,5 +13,6 @@ import test from 'ava'; | ||
import RouterContainer from 'redux-router-kit/src/components/RouterContainer'; | ||
import createReactClass from 'create-react-class'; | ||
test('render route to string', t => { | ||
const Home = React.createClass({ | ||
const Home = createReactClass({ | ||
render() { | ||
@@ -44,3 +45,3 @@ return <div>Home</div>; | ||
test('render async route to string', t => { | ||
const Home = React.createClass({ | ||
const Home = createReactClass({ | ||
render() { | ||
@@ -50,3 +51,3 @@ return <div>Home</div>; | ||
}); | ||
const Todos = React.createClass({ | ||
const Todos = createReactClass({ | ||
render() { | ||
@@ -53,0 +54,0 @@ return <div>Todos</div>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
235802
7
74
0
505
6095
- Removedcreate-react-class@^15.6.2
- Removedcreate-react-class@15.7.0(transitive)