withUser

withUser is a helper HOC that will pass the current user object to the composed component as a property

How to use

import { Plugin } from '@root'

const MyCustomComponent = props => {
    return (
        <div>
            <p>username: {props.user.name}</p>
        </div>
    )
}

export default Plugin.withUser(MyCustomComponent)

Last updated