alinz / react-native-webview-bridge

React Native Webview with Javascript Bridge
MIT License
1.37k stars 491 forks source link

when using const SRC = require(...html) webview stays blank #162

Closed mlostekk closed 8 years ago

mlostekk commented 8 years ago

Anybody encountering the same issue?

When i use

const WEB = require('../../../assets/player/vib_and_sound/index.html');

and

<WebViewBridge
                    style={styles.webview}
                    ref="webviewbridge"
                    onBridgeMessage={this.onBridgeMessage}
                    source={WEB}  // DOES NOT WORK
                    //source={{ uri: "https://www.youtube.com/embed/70We1tmFKwU" }} // WORKS                 
                    bounces={false}
                    />

it does not work. When i use an http url as source, it works fine.

Anything i am forgetting to do?

hmedney commented 8 years ago

Hi @mlostekk, couple of things: