package org.sagebionetworks.web.client.widget;

import org.sagebionetworks.web.client.jsinterop.ReactDOM;

import com.google.gwt.dom.client.Element;

/**
 * Utility methods that manage the React component lifecycle from GWT lifecycle methods
 */
public abstract class ReactComponentLifecycleUtils {
	protected static void onUnload(Element e) {
		ReactDOM.unmountComponentAtNode(e);
	}

	public static void clear(Element e) {
		ReactDOM.unmountComponentAtNode(e);
	}
}

@@ -141,16 +141,105 @@
 Element;
+%0Aimport com.google.gwt.user.client.ui.Panel;%0Aimport com.google.gwt.user.client.ui.Widget;
 %0A%0A/**%0A *
@@ -339,17 +339,8 @@
 lic 
-abstract 
 clas
@@ -372,16 +372,96 @@
 Utils %7B%0A
+%09/**%0A%09 * Should be used to override %7B@link Widget#onUnload()%7D%0A%09 * @param e%0A%09 */%0A
 %09protect
@@ -539,16 +539,92 @@
 e);%0A%09%7D%0A%0A
+%09/**%0A%09 * Should be used to override %7B@link Panel#clear()%7D%0A%09 * @param e%0A%09 */%0A
 %09public 

Should not be abstract