riahk commented on a change in pull request #11983:
URL:
https://github.com/apache/incubator-superset/pull/11983#discussion_r541194102
##########
File path: superset-frontend/src/views/CRUD/hooks.ts
##########
@@ -399,6 +439,7 @@ export function useImportResource<D extends object = any>(
state: {
loading: state.loading,
Review comment:
Was discussing this with @nytai who originally wrote this logic for
`useListViewResource`. I think the original intent was explicitly defining the
state variables because some of that hook's state variables are strictly
internal. However, in `useSingleViewResource` we're returning all the state
variables, so it should be fine to just import the entire `state` object (I
will probably refactor the hook to do this at some point).
It looks like that's the case here as well so you can easily just import the
entire `state` object like you suggested above.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]