Skip to content

How can I create javascript modules (no native dependency) using React Native CLI rather than Expo? #61

@shettayyy

Description

@shettayyy

Question

I am using the below-listed dependencies:

    "@react-native-community/async-storage": "*",
    "react": "*",
    "react-native": "*",
    "react-native-extended-stylesheet": "*",
    "react-native-fast-image": "*",
    "react-native-localization": "*",
    "react-native-safe-area-context": "*",
    "react-native-vector-icons": "*"

to export reusable components. It is very similar to react-native-paper. I just want to install the package and start using it rather than running npx pod-install.

The problem with choosing Javascript modules with native example is, it uses Expo. I do not want to use expo. Instead, I want to use React Native CLI for examples so that I can integrate react-native-vector-icons

This package is brilliant and I have already built a package by choosing the option Kotlin and Swift which offers exactly what I need, but I had to run npx pod-install in my actual project to connect my npm package which seems pointless for exporting non-native modules. For example, let's say I created react-native-components and installed in my project like so npm install react-native-components. Then, I had to run npx pod-install. But, I am sure it happened because I chose Native module with Kotlin and swift.

How can I create component, render the components in an example react-native cli application by linking the package and connect the packages with the native dependencies such as react-native-vector-icons directly in the example project?

Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions