Skip to content

Commit decdf93

Browse files
author
Brian Vaughn
committed
Fixed an additional unmount edge case. Moved hook into temporary package.
1 parent 396f973 commit decdf93

File tree

7 files changed

+47
-2
lines changed

7 files changed

+47
-2
lines changed

packages/create-subscription/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
'use strict';
1111

1212
export * from './src/createSubscription';
13-
export * from './src/useSubscription';

packages/react-hooks/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# react-hooks
2+
3+
Placeholder package.

packages/react-hooks/index.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow
8+
*/
9+
10+
'use strict';
11+
12+
export * from './src/useSubscription';

packages/react-hooks/npm/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
if (process.env.NODE_ENV === 'production') {
4+
module.exports = require('./cjs/react-hooks.production.min.js');
5+
} else {
6+
module.exports = require('./cjs/react-hooks.development.js');
7+
}

packages/react-hooks/package.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"private": true,
3+
"name": "react-hooks",
4+
"description": "Reusable hooks",
5+
"version": "16.8.3",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/facebook/react.git",
9+
"directory": "packages/react-hooks"
10+
},
11+
"files": [
12+
"LICENSE",
13+
"README.md",
14+
"build-info.json",
15+
"index.js",
16+
"cjs/"
17+
],
18+
"peerDependencies": {
19+
"react": "^16.3.0"
20+
},
21+
"devDependencies": {
22+
"rxjs": "^5.5.6"
23+
}
24+
}

packages/create-subscription/src/__tests__/useSubscription-test.internal.js packages/react-hooks/src/__tests__/useSubscription-test.internal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('useSubscription', () => {
2222
jest.resetModules();
2323
jest.mock('scheduler', () => require('scheduler/unstable_mock'));
2424

25-
useSubscription = require('create-subscription').useSubscription;
25+
useSubscription = require('react-hooks').useSubscription;
2626
React = require('react');
2727
ReactTestRenderer = require('react-test-renderer');
2828
Scheduler = require('scheduler');

0 commit comments

Comments
 (0)