Skip to content

Commit 19adfe0

Browse files
author
James Pearson
committed
Reordered onMessage to be after the spread of props (prevents overwriting)
1 parent 369dac2 commit 19adfe0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ export default class MyWebView extends Component {
8181
ref={(ref) => { this.webview = ref; }}
8282
injectedJavaScript={Platform.OS === 'ios' ? iosScript : androidScript}
8383
scrollEnabled={this.props.scrollEnabled || false}
84-
onMessage={this._onMessage}
8584
javaScriptEnabled={true}
8685
automaticallyAdjustContentInsets={true}
8786
{...this.props}
88-
style={[{width: _w}, this.props.style, {height: _h}]}
87+
onMessage={this._onMessage}
88+
style={[{ width: _w }, this.props.style, { height: _h }]}
8989
/>
9090
)
9191
}

0 commit comments

Comments
 (0)