-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port entry point consolidation from 8.x branch (#1811)
- Loading branch information
1 parent
c16d3c1
commit c8f5674
Showing
4 changed files
with
34 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,9 @@ | ||
import Provider from './components/Provider' | ||
import connectAdvanced from './components/connectAdvanced' | ||
import { ReactReduxContext } from './components/Context' | ||
import connect from './connect/connect' | ||
|
||
import { useDispatch } from './hooks/useDispatch' | ||
import { useSelector } from './hooks/useSelector' | ||
import { useStore } from './hooks/useStore' | ||
export * from './exports' | ||
|
||
import { getBatch } from './utils/batch' | ||
import shallowEqual from './utils/shallowEqual' | ||
|
||
// For other renderers besides ReactDOM and React Native, use the default noop batch function | ||
// For other renderers besides ReactDOM and React Native, | ||
// use the default noop batch function | ||
const batch = getBatch() | ||
|
||
export { | ||
Provider, | ||
connectAdvanced, | ||
ReactReduxContext, | ||
connect, | ||
batch, | ||
useDispatch, | ||
useSelector, | ||
useStore, | ||
shallowEqual, | ||
} | ||
export { batch } |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Provider from './components/Provider' | ||
import connectAdvanced from './components/connectAdvanced' | ||
import { ReactReduxContext } from './components/Context' | ||
import connect from './connect/connect' | ||
|
||
import { useDispatch, createDispatchHook } from './hooks/useDispatch' | ||
import { useSelector, createSelectorHook } from './hooks/useSelector' | ||
import { useStore, createStoreHook } from './hooks/useStore' | ||
|
||
import shallowEqual from './utils/shallowEqual' | ||
|
||
export { | ||
Provider, | ||
connectAdvanced, | ||
ReactReduxContext, | ||
connect, | ||
useDispatch, | ||
createDispatchHook, | ||
useSelector, | ||
createSelectorHook, | ||
useStore, | ||
createStoreHook, | ||
shallowEqual, | ||
} |
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,29 +1,10 @@ | ||
import Provider from './components/Provider' | ||
import connectAdvanced from './components/connectAdvanced' | ||
import { ReactReduxContext } from './components/Context' | ||
import connect from './connect/connect' | ||
export * from './exports' | ||
|
||
import { useDispatch, createDispatchHook } from './hooks/useDispatch' | ||
import { useSelector, createSelectorHook } from './hooks/useSelector' | ||
import { useStore, createStoreHook } from './hooks/useStore' | ||
|
||
import { setBatch } from './utils/batch' | ||
import { unstable_batchedUpdates as batch } from './utils/reactBatchedUpdates' | ||
import shallowEqual from './utils/shallowEqual' | ||
import { setBatch } from './utils/batch' | ||
|
||
// Enable batched updates in our subscriptions for use | ||
// with standard React renderers (ReactDOM, React Native) | ||
setBatch(batch) | ||
|
||
export { | ||
Provider, | ||
connectAdvanced, | ||
ReactReduxContext, | ||
connect, | ||
batch, | ||
useDispatch, | ||
createDispatchHook, | ||
useSelector, | ||
createSelectorHook, | ||
useStore, | ||
createStoreHook, | ||
shallowEqual, | ||
} | ||
export { batch } |