You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/10/15 17:36:23 UTC

[GitHub] [incubator-superset] rusackas commented on a change in pull request #11240: refactor: Replace usages of reactable in TableLoader

rusackas commented on a change in pull request #11240:
URL: https://github.com/apache/incubator-superset/pull/11240#discussion_r505721075



##########
File path: superset-frontend/src/components/TableLoader.jsx
##########
@@ -18,12 +18,13 @@
  */
 import React from 'react';
 import PropTypes from 'prop-types';
-import { Table, Tr, Td } from 'reactable-arc';
+import memoize from 'lodash/memoize';

Review comment:
       I don't want to "rock the boat" on this PR, but this would only be the second instance of `lodash/memoize` in the codebase. The other one looks like it'd be a simple refactor to use the `useMemo` hook. 
   
   Maybe this component is worth a revisit in a follow-up PR to address the following:
   • Convert to a function component (removing UNSAFE method use)
   • convert to `useMemo` to support the pattern
   • convert to TypeScript while we're at it
   • Make folders for TableLoader & TableView, which would contain the `index.tsx` file, a Storybook entry, and their respective `...test.(j|t)sx` file




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org