{"library":"react-native-websocket","type":"library","category":null,"description":"Provides a React Native component wrapper around the WebSocket API for managing real-time connections declaratively. Current stable version 1.0.2 (last release in 2019) receives minimal maintenance. Key differentiator: turns WebSocket lifecycle into a React component with props for events (onOpen, onMessage, onClose, onError) and a ref-based send() method. Alternatives like 'react-native-use-websocket' offer hooks-based usage and better maintenance. Requires polyfill for older React Native versions (0.60+) and does not support React Native Web or Expo managed workflow natively.","language":"javascript","status":"maintenance","version":"1.0.2","tags":["javascript","react","react-native","websocket","ws","component","react-native-websocket"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install react-native-websocket","imports":["import WS from 'react-native-websocket'","import WS from 'react-native-websocket'","const wsRef = useRef(null); <WS ref={wsRef} ... />"]},{"cmd":"yarn add react-native-websocket","imports":[]},{"cmd":"pnpm add react-native-websocket","imports":[]}],"homepage":"https://github.com/tiaanduplessis/react-native-websocket","github":"https://github.com/tiaanduplessis/react-native-websocket","docs":null,"changelog":null,"pypi":null,"npm":"react-native-websocket","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}