Created
October 3, 2018 06:38
-
-
Save phpbits/d3bc25feed440947b448d9892a3f6760 to your computer and use it in GitHub Desktop.
Access on Edit component using withSelect
This file contains hidden or 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
| edit: withSelect( ( select ) => { | |
| return { | |
| roles: select('phpbits/test-block').receiveUserRoles(), | |
| }; | |
| } )( props => { | |
| console.log( this.props.roles ); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment