{"id":49083,"library":"react-native-grpc-service","title":"react-native-grpc-service","description":"React Native bridge for gRPC services, enabling communication with gRPC servers via Protobuf definitions. Current version 0.1.17 targets React Native 0.62.2+. It requires manual native configuration (iOS/Android) and uses a JSON config file to specify proto files. Supports unary requests; streaming features are in roadmap. Differentiates as a pure RN-native solution without JavaScript fallback.","status":"active","version":"0.1.17","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","grpc","protobuf","react-native"],"install":[{"cmd":"npm install react-native-grpc-service","lang":"bash","label":"npm"},{"cmd":"yarn add react-native-grpc-service","lang":"bash","label":"yarn"},{"cmd":"pnpm add react-native-grpc-service","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for native module","package":"react-native","optional":false}],"imports":[{"note":"ESM default import is recommended; CJS require may not trigger native module linking correctly.","wrong":"const RNGrpcService = require('react-native-grpc-service');","symbol":"default","correct":"import RNGrpcService from 'react-native-grpc-service';"},{"note":"GrpcService is a class instantiated with server address; service methods are accessed directly on the instance.","wrong":"new GrpcService().TodoService.Create(...)","symbol":"TodoService with dot notation","correct":"GrpcService.TodoService.Create({ name: 'test' }).then(...)"},{"note":"Configuration is read from the JSON file at app startup, not passed programmatically.","wrong":"Pass config directly to constructor","symbol":"Configuration via JSON file","correct":"Place react-native-grpc-service.json in project root with protoDirectory and protoFile."}],"quickstart":{"code":"// 1. Install: npm install react-native-grpc-service\n// 2. Create react-native-grpc-service.json at project root:\n{\n  \"protoDirectory\": \"../server/proto\",\n  \"protoFile\": \"app.proto\"\n}\n\n// 3. Native linking (assuming react-native >= 0.60):\n// iOS: pod install, then add RNGrpcService.xcodeproj to Libraries\n// Android: Manual steps as per README\n\n// 4. GrpcService.ts:\nimport RNGrpcService from 'react-native-grpc-service';\nconst grpcService = new RNGrpcService('localhost:8080');\nexport default grpcService;\n\n// 5. App.tsx:\nimport React, { useEffect } from 'react';\nimport grpcService from './GrpcService';\n\nfunction App() {\n  useEffect(() => {\n    grpcService.TodoService.Create({ name: 'test' }).then(response => {\n      console.log(response.data);\n    }).catch(error => console.error(error));\n  }, []);\n  return <View />;\n}","lang":"typescript","description":"Shows full setup: install, config file, class instantiation, and unary request call."},"warnings":[{"fix":"Follow manual installation steps for iOS and Android if link fails.","message":"Requires manual native setup; autolinking may not work for all RN versions.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Upgrade react-native to 0.62.2 or higher.","message":"Min supported React Native version is 0.62.2.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Ensure correct filename and location.","message":"Configuration file must be named 'react-native-grpc-service.json' and placed at project root.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use pod install for iOS and manual Android steps.","message":"react-native link is deprecated for RN 0.60+; use autolinking or manual pod install.","severity":"deprecated","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.17':22 '0.62.2':26 'bridg':8 'communic':13 'config':37 'configur':31 'current':20 'definit':19 'differenti':51 'enabl':12 'fallback':61 'featur':47 'file':38,42 'grpc':4,10,15,63 'ios/android':32 'javascript':60,62 'json':36 'manual':29 'nativ':3,7,25,30,57,67 'proto':41 'protobuf':18,64 'pure':54 'react':2,6,24,66 'react-nat':65 'react-native-grpc-servic':1 'request':45 'requir':28 'rn':56 'rn-nativ':55 'roadmap':50 'server':16 'servic':5,11 'solut':58 'specifi':40 'stream':46 'support':43 'target':23 'unari':44 'use':34 'version':21 'via':17 'without':59","created_at":"2026-06-07T16:59:57.838828+00:00","updated_at":"2026-06-07T16:59:57.838828+00:00","problems":[{"fix":"Run 'npm install react-native-grpc-service' and ensure it's in dependencies.","cause":"Package not installed correctly or node_modules missing.","error":"Error: Cannot find module 'react-native-grpc-service'"},{"fix":"Use 'import RNGrpcService from 'react-native-grpc-service'' or 'const RNGrpcService = require('react-native-grpc-service').default'.","cause":"Using default import incorrectly in CommonJS environment.","error":"RNGrpcService is not a constructor"},{"fix":"Re-run 'react-native link' or manually link libraries per README.","cause":"Native linking not completed correctly.","error":"Native module cannot be null"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"react-native-grpc-service","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}