Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Wrap the component in query so it updates count automatically
- const CounterWrapped = wp.data.query( select => {
- return {
- //In the counter, we registered the reducer "countingPlugin" and the selector "getCount"
- //Those provide the count to the component
- count: select( 'countingPlugin', 'getCount' ),
- };
- } )( Counter );
Add Comment
Please, Sign In to add comment