From 59558df383a3546523d6663e9b6e7458f34b812e Mon Sep 17 00:00:00 2001 From: asklie <760956257@qq.com> Date: Tue, 2 Jul 2024 16:07:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E9=80=82=E9=85=8D=E6=96=B0react-na?= =?UTF-8?q?ive=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 3 +-- package.json | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 0a08e98..1e091be 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,4 @@ -import {NativeModules} from 'react-native' -const {WebSocketModule} = NativeModules; +import WebSocketModule from 'react-native/Libraries/WebSocket/NativeWebSocketModule'; let settings = { /** The number of milliseconds to delay before attempting to reconnect. */ diff --git a/package.json b/package.json index ff2e9eb..b187618 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { - "name": "react-native-reconnecting-websocket", - "version": "1.0.3", + "name": "@react-native-oh-tpl/react-native-reconnecting-websocket", + "version": "1.0.3-0.0.1", "description": "websocket module", "main": "index.js", + "harmony": { + "alias": "react-native-reconnecting-websocket" + }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, @@ -16,4 +19,4 @@ "url": "https://github.com/React-Sextant/react-native-reconnecting-websocket/issues" }, "homepage": "https://github.com/React-Sextant/react-native-reconnecting-websocket#readme" -} +} \ No newline at end of file