{"library":"react-native-hardwired","title":"react-native-hardwired","description":"react-native-hardwired v0.10.2 enables runtime dynamic imports of pre-compiled React Native modules, bridging the gap between static bundling and deferred loading. Unlike standard React Native's static require or Metro's lazy loading, this library works with modules already transpiled by Babel/TypeScript, allowing you to load code on demand without ejection or native changes. It ships TypeScript definitions and is released on npm with monthly cadence. Key differentiator: no native modules, works with Hermes, and integrates directly with Metro's require system.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install react-native-hardwired"],"cli":null},"imports":["import { Hardwired } from 'react-native-hardwired'","import { useHardwired } from 'react-native-hardwired'","import type { HardwiredModule } from 'react-native-hardwired'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { Hardwired } from 'react-native-hardwired';\n\n// Create a hardwired loader instance\nconst loader = new Hardwired({ baseDir: './modules' });\n\n// Dynamically load a precompiled module at runtime\nasync function loadModule() {\n  try {\n    const module = await loader.load('my-dynamic-module');\n    module.default(); // call default export\n  } catch (error) {\n    console.error('Failed to load module:', error);\n  }\n}\n\nloadModule();","lang":"typescript","description":"Shows creating a Hardwired loader and dynamically importing a precompiled module at runtime.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}