I realize this question is a couple of weeks old, but I figure it's still
worth answering in case you haven't found a solution.
Do you run
require('react-native')
before you try to load your GWT library? When RN loads, it does define a
global window object
<https://github.com/facebook/react-native/blob/737abe3b7603e27a1a88498b3a260d67fa747ee7/Libraries/Core/InitializeCore.js#L35>.
I haven't tried using GWT generated code in React Native, but I've used
them both quite heavily in the past, so I'll give it a try and see how it
goes.
On Thursday, June 29, 2017 at 7:13:36 AM UTC-4, Igor wrote:
> Hi all,
>
> I have a Java project which performs scientific calculations. It does not
> have any dependencies and it does not reference any UI, DOM, or any other
> web environment features. It is basically a few custom data structures and
> algorithms. I wish to expose one class in this project using JsInterop and
> consume it in a React Native and React app.
>
> I've successfully transpiled the Java into Javascript, but I am unable to
> use it my React Native app because the resulting Javascript seems to
> reference UI elements (there's always "var $wnd = $wnd || window.parent..."
> at the top of the cache.js file which React Native chokes on). Is there a
> way to achieve my goal and, if so, how?
>
> Thanks,
>
> Igor
>
--
You received this message because you are subscribed to the Google Groups "GWT
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.