-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ui-core] add useSaveData hook for api calls #3864
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but see question.
setError(undefined); | ||
|
||
try { | ||
const PostUrl = localOptions?.urlPrefix ? `${localOptions.urlPrefix}${url}` : url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't part of the reason for creating a save hook be to hide away details like url-prefix etc? Is there a use case for using this with different url-prefixes in Hue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, I believe I have over complicated it. Let me remove the urlPrefix here and also in useLoadData
What changes were proposed in this pull request?
How was this patch tested?
Usage