Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

feat(request-registry-react): Allow to provide a process function #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jantimon
Copy link
Contributor

@jantimon jantimon commented Sep 2, 2019

Allow to cleanup the data before it is used:

const name = useGetEndPoint(userEndpoint, { id: props.id }, endpointState => {
    if (endpointState.hasValue) {
        return endpointState.value.name;
    }
});
console.log(name); // Will return the name or undefined

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant