Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #62 from yahoo/fluxible-0.5.x
Browse files Browse the repository at this point in the history
Update to fluxible@0.5.x
  • Loading branch information
mridgway committed Jul 9, 2015
2 parents 7da5efb + b0fe2e6 commit 7503b30
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/NavLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*global window */
'use strict';

var React = require('react/addons');
var React = require('react');
var navigateAction = require('./navigateAction');
var debug = require('debug')('NavLink');
var objectAssign = require('object-assign');
Expand Down
13 changes: 7 additions & 6 deletions lib/handleRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*global window */
'use strict';
var React = require('react');
var connectToStores = require('fluxible/addons/connectToStores');
var connectToStores = require('fluxible-addons-react/connectToStores');
var objectAssign = require('object-assign');
var hoistNonReactStatics = require('hoist-non-react-statics');

Expand All @@ -32,12 +32,13 @@ module.exports = function handleRoute(Component) {
}
});

RouteHandler = connectToStores(RouteHandler, ['RouteStore'], function (stores, props) {
RouteHandler = connectToStores(RouteHandler, ['RouteStore'], function (context) {
var routeStore = context.getStore('RouteStore');
return {
currentNavigate: stores.RouteStore.getCurrentNavigate(),
currentNavigateError: stores.RouteStore.getCurrentNavigateError(),
isNavigateComplete: stores.RouteStore.isNavigateComplete(),
currentRoute: stores.RouteStore.getCurrentRoute()
currentNavigate: routeStore.getCurrentNavigate(),
currentNavigateError: routeStore.getCurrentNavigateError(),
isNavigateComplete: routeStore.isNavigateComplete(),
currentRoute: routeStore.getCurrentRoute()
};
});

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
],
"dependencies": {
"debug": "^2.0.0",
"fluxible-addons-react": "^0.1.6",
"hoist-non-react-statics": "^1.0.0",
"immutable": "^3.6.2",
"inherits": "^2.0.1",
Expand All @@ -29,7 +30,7 @@
"routr": "^0.1.1"
},
"peerDependencies": {
"fluxible": "^0.4.9",
"fluxible": "^0.5.0",
"react": "0.13.x"
},
"devDependencies": {
Expand All @@ -38,7 +39,7 @@
"chai": "^2.0.0",
"coveralls": "^2.11.1",
"eslint": "^0.21.0",
"fluxible": "^0.4.9",
"fluxible": "^0.5.0",
"istanbul": "^0.3.2",
"jsdom": "^3.0.2",
"lodash": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/mocks/MockAppComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
'use strict';
var React = require('react/addons');
var provideContext = require('fluxible/addons/provideContext');
var provideContext = require('fluxible-addons-react/provideContext');
var handleHistory = require('../../lib/handleHistory');

var MockAppComponent = React.createClass({
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lib/handleHistory-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('handleHistory', function () {
global.navigator = global.window.navigator;
global.window.scrollTo = scrollToMock;
React = require('react');
provideContext = require('fluxible/addons/provideContext');
provideContext = require('fluxible-addons-react/provideContext');
handleHistory = require('../../../').handleHistory;
MockAppComponent = require('../../mocks/MockAppComponent').UnwrappedMockAppComponent;
ReactTestUtils = React.addons.TestUtils;
Expand Down

0 comments on commit 7503b30

Please sign in to comment.