Re: [gwt-contrib] Trying to use JsInterop to work with React

2016-03-13 Thread 'Goktug Gokdogan' via GWT Contributors
I'm not knowledgeable about React but I assume that you cannot instantiate a React component directly via its constructor, instead you need to call another function and pass the class? The class in javascript is actually the "constructor" function. There are multiple ways to get the constructor fu

[gwt-contrib] Re: Trying to use JsInterop to work with React

2016-03-13 Thread Paul Stockley
I got the following working. Seems like there should be a cleaner way. @JsType public class CustomComponent { public static ReactElement render() { return React.createElement("div", null, "It works"); } static final public native JavaScriptObject makeSpec() /*-{ retu

[gwt-contrib] Rules for managing issues on GitHub

2016-03-13 Thread Thomas Broyer
Hi all, Here's a document a wrote (months ago actually) about the differences between Google Code Hosting and GitHub wrt their respective issue trackers. https://docs.google.com/document/d/1yJva4UWQ7XO-gGtFm4ykXt0tubn9j1nncWPPz57IH9M/edit We discussed it briefly at our last Steering Committee m

Re: [gwt-contrib] Trying to use JsInterop to work with React

2016-03-13 Thread Paul Stockley
If I can get a fully working proof of concept I may consider creating a project on github. However, there is still a lot to prove before I get to that stage. -- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group a

Re: [gwt-contrib] Trying to use JsInterop to work with React

2016-03-13 Thread James Horsley
Paul, any chance you're thinking of releasing your code on github or something? I think an open sourced ReactJs-GWT jsinterop wrapper would be something a number of people might be interested in using and contributing to. On Sun, Mar 13, 2016 at 9:45 PM Paul Stockley wrote: > I did think about t

Re: [gwt-contrib] Trying to use JsInterop to work with React

2016-03-13 Thread Paul Stockley
I did think about the ES6 class approach. However, The createElement method would need to take the class as a parameter (not an instance). How would I do that? On Sunday, March 13, 2016 at 5:32:19 PM UTC-4, Goktug Gokdogan wrote: > > See examples on how ES6 classes work with React. Those examp

Re: [gwt-contrib] Trying to use JsInterop to work with React

2016-03-13 Thread 'Goktug Gokdogan' via GWT Contributors
See examples on how ES6 classes work with React. Those examples should apply to @JsTypes as well. On Sun, Mar 13, 2016 at 2:12 PM, Colin Alworth wrote: > Yikes, that's rather opinionated. I don't personally work with React, but > I guess I'm surprised that it can't handle actual inheritance (or

Re: [gwt-contrib] Trying to use JsInterop to work with React

2016-03-13 Thread Colin Alworth
Yikes, that's rather opinionated. I don't personally work with React, but I guess I'm surprised that it can't handle actual inheritance (or even defining a prototype and attaching it to a constructor). Based on what you have there and the details described at https://facebook.github.io/react/docs/

[gwt-contrib] Trying to use JsInterop to work with React

2016-03-13 Thread Paul Stockley
We have started using React (using ES6 and FlowTypes) which is quite nice. However, we have a large GWT application that we want to start embedding React within. This makes perfect sense for migrating away from Widgets to a more modern approach. So I decided I would try and define a Java Api for