How vetster/react-native-action-sheet works
Project type and purpose
• This is an open-source React Native component library published as an NPM package (@vetster/react-native-action-sheet).
• Its goal is to provide a cross-platform Action Sheet: native UIActionSheet on iOS and a JS-based ActionSheet on Android.
File structure
• Top-level directories and files:
• src/ – the TS/JS core library (components, context, hooks, HOC)
• ios/ – native Swift/Objective-C bridge code for iOS
• example/ – a sample React Native app demonstrating usage (Android + iOS projects under example/android and example/ios)
• scripts/ – build and bootstrap helpers (e.g. for monorepo tooling)
• .github/ – CI and release workflows
• configs (babel.config.js, tsconfig.json, bob build config in package.json)
README for additional insights
• Confirms cross-platform approach, outlines the public API (ActionSheetProvider, useActionSheet hook, connectActionSheet HOC), platform-specific props, and installation/build instructions.
• Describes how JS context and native modules interact to invoke the appropriate UI.
• from App → ActionSheetProvider → showActionSheetWithOptions → platform module → user tap callback → back to App.
• from build scripts → compiled outputs → NPM package.
• Orange or gray for tooling (build, CI).
Be detailed and complete
• Break the library into all major sub-components (context provider, hook/HOC, component modules, native bridge, build pipeline).
• State flow and data flow: how options go from JS → native/custom UI → callback.
• Packaging and deployment artifacts (bob build, package.json, GitHub Actions).