Browse Source

add comment for lazy loading

Ramona Plogmann 2 years ago
parent
commit
6fc200e64b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      client/src/components/Social/UserList.jsx

+ 1 - 0
client/src/components/Social/UserList.jsx

@@ -11,6 +11,7 @@ import { faClipboardList, faUtensils } from "@fortawesome/free-solid-svg-icons";
 import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
 import { useNavigate } from "react-router-dom";
 
+// Flags is a huge component (10MB unzipped, 1,24 after bundling and packing) so it must be lazy-loaded
 const Flag = lazy(() => import('react-world-flags'));
 
 const useStyles = makeStyles(theme => ({