-
-
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.
- Loading branch information
1 parent
17ddf9d
commit 918e7e9
Showing
6 changed files
with
77 additions
and
89 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 was deleted.
Oops, something went wrong.
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,9 @@ | ||
export * from './exports' | ||
|
||
import { getBatch } from './utils/batch' | ||
|
||
// For other renderers besides ReactDOM and React Native, | ||
// use the default noop batch function | ||
const batch = getBatch() | ||
|
||
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,61 @@ | ||
import Provider from './components/Provider' | ||
import type { ProviderProps } from './components/Provider' | ||
import connectAdvanced from './components/connectAdvanced' | ||
import type { | ||
ConnectAdvancedOptions, | ||
ConnectProps, | ||
} from './components/connectAdvanced' | ||
import type { | ||
SelectorFactory, | ||
Selector, | ||
MapStateToProps, | ||
MapStateToPropsFactory, | ||
MapStateToPropsParam, | ||
MapDispatchToPropsFunction, | ||
MapDispatchToProps, | ||
MapDispatchToPropsFactory, | ||
MapDispatchToPropsParam, | ||
MapDispatchToPropsNonObject, | ||
MergeProps, | ||
} from './connect/selectorFactory' | ||
import { ReactReduxContext } from './components/Context' | ||
import type { ReactReduxContextValue } 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 * from './types' | ||
export type { | ||
ProviderProps, | ||
SelectorFactory, | ||
Selector, | ||
MapStateToProps, | ||
MapStateToPropsFactory, | ||
MapStateToPropsParam, | ||
ConnectProps, | ||
ConnectAdvancedOptions, | ||
MapDispatchToPropsFunction, | ||
MapDispatchToProps, | ||
MapDispatchToPropsFactory, | ||
MapDispatchToPropsParam, | ||
MapDispatchToPropsNonObject, | ||
MergeProps, | ||
ReactReduxContextValue, | ||
} | ||
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,66 +1,10 @@ | ||
import Provider from './components/Provider' | ||
import type { ProviderProps } from './components/Provider' | ||
import connectAdvanced from './components/connectAdvanced' | ||
import type { | ||
ConnectAdvancedOptions, | ||
ConnectProps, | ||
} from './components/connectAdvanced' | ||
import type { | ||
SelectorFactory, | ||
Selector, | ||
MapStateToProps, | ||
MapStateToPropsFactory, | ||
MapStateToPropsParam, | ||
MapDispatchToPropsFunction, | ||
MapDispatchToProps, | ||
MapDispatchToPropsFactory, | ||
MapDispatchToPropsParam, | ||
MapDispatchToPropsNonObject, | ||
MergeProps, | ||
} from './connect/selectorFactory' | ||
import { ReactReduxContext } from './components/Context' | ||
import type { ReactReduxContextValue } 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 * from './types' | ||
export type { | ||
ProviderProps, | ||
SelectorFactory, | ||
Selector, | ||
MapStateToProps, | ||
MapStateToPropsFactory, | ||
MapStateToPropsParam, | ||
ConnectProps, | ||
ConnectAdvancedOptions, | ||
MapDispatchToPropsFunction, | ||
MapDispatchToProps, | ||
MapDispatchToPropsFactory, | ||
MapDispatchToPropsParam, | ||
MapDispatchToPropsNonObject, | ||
MergeProps, | ||
ReactReduxContextValue, | ||
} | ||
export { | ||
Provider, | ||
connectAdvanced, | ||
ReactReduxContext, | ||
connect, | ||
batch, | ||
useDispatch, | ||
createDispatchHook, | ||
useSelector, | ||
createSelectorHook, | ||
useStore, | ||
createStoreHook, | ||
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