EugeneTorap commented on code in PR #21667:
URL: https://github.com/apache/superset/pull/21667#discussion_r984980531


##########
superset-frontend/src/SqlLab/components/SqlEditor/index.jsx:
##########
@@ -229,13 +229,20 @@ const SqlEditor = ({
     }
   };
 
-  useState(() => {
+  const runQuery = () => {
+    if (database) {
+      startQuery();
+    }
+  };
+
+  // hack the useMemo hook to imitate componentWillMount
+  useMemo(() => {

Review Comment:
   @eric-briscoe am I correct
   useMemo(() => {}, []); is componentWillMount event.
   useEffect(() => {}, []); is componentDidMount



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to