Skip to content

Commit d034f67

Browse files
author
罗坤
committed
feat: [2.0.0] Upgrade WebSocketModule import path
1 parent 8f760a2 commit d034f67

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import {NativeModules} from 'react-native'
2-
const {WebSocketModule} = NativeModules;
1+
// import {NativeModules} from 'react-native'
2+
// const {WebSocketModule} = NativeModules;
3+
import WebSocketModule from 'react-native/Libraries/WebSocket/NativeWebSocketModule';
4+
35

46
let settings = {
57
/** The number of milliseconds to delay before attempting to reconnect. */

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-reconnecting-websocket",
3-
"version": "1.0.3",
3+
"version": "2.0.0",
44
"description": "websocket module",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)