Skip to content

Commit e63b9cd

Browse files
author
Paul Stockley
committed
Make use of new JsConstructor available in GWT 2.8.1
1 parent 7b40b45 commit e63b9cd

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/gwt/react/preact_sanity_test/client/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void onModuleLoad() {
3737
),
3838
React.createElement(StatefulExample.class, statefulCompProps),
3939
//The following creates an element using a ComponentConstructorFn
40-
React.createElement(StatefulExample2.component(), null)
40+
React.createElement(StatefulExample2.class, null)
4141
);
4242

4343
ReactDOM.render(appComp, Document.get().getElementById("mainCont"), () -> Window.alert("Rendered"));

src/gwt/react/preact_sanity_test/client/StatefulExample2.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,4 @@ void onClicked(MouseEvent e) {
6363
)
6464
);
6565
}
66-
67-
//You cannot pass the Class directly to React.createElement if you have renamed the JsType or
68-
//disabled class meta data using (-XnoclassMetadata) . In this case, you need to use ComponentUtils.getCtorFn
69-
//to get the constructor function
70-
public static ComponentConstructorFn<BaseProps> component() {
71-
return getCtorFn(StatefulExample2.class, "RenamedStatefulExample2");
72-
}
7366
}

0 commit comments

Comments
 (0)