React Native Create Custom Component/Library

后端 未结 4 2004
一向
一向 2020-12-23 12:27

In React Native, there are certain third-party components which compile their own libraries that can be included in your main React project. Examples of such third-party lib

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 13:13

    1. Command: new-library

    React-native-cli offers the new-library command:

    react-native new-library --name 
    

    Calling this will generate a sample library in your Libraries directory by copying sample file over from the react-native library.

    2. Developing

    React Native has a couple docs specifically for writing Native Modules and Native UI Components, depending on what you want to achieve.

    3. Link component

    Link your component once you're done by following the instructions you already mentioned.

提交回复
热议问题