Skip to content

Commit

Permalink
Data: Add RegistryConsumer export (#9042)
Browse files Browse the repository at this point in the history
The plugin code relies on the RegistryProvider to be able to add
functionality to the registry. `withSelect` uses the RegistryConsumer,
but code outside of `@wordpress/data` can't access this modified
registry at all (even though it can create it!).
This solves the incongruence by simply exporting RegistryConsumer as
well.
  • Loading branch information
coderkevin authored and youknowriad committed Aug 16, 2018
1 parent 837d908 commit 3b9d23f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/data/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as plugins from './plugins';

export { default as withSelect } from './components/with-select';
export { default as withDispatch } from './components/with-dispatch';
export { default as RegistryProvider } from './components/registry-provider';
export { default as RegistryProvider, RegistryConsumer } from './components/registry-provider';
export { createRegistry } from './registry';
export {
withRehydration,
Expand Down

0 comments on commit 3b9d23f

Please sign in to comment.