Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 220.127.116.11 release ready!
Updated 6 March 2021
The module is a very important thing in our development, By using module we split our problems into many parts or we can generalize our problems into a specific form. In this blog, I will focus on how to create a module in the react-native project and how to implement it on our existing project manually.
React native Community recommends us the third party tool library to create a basic structure of module without any worry for module structure.
Library Name– “create-react-native-module”
Requirements: Node 8.0+
Packages required to be installed globally if the recommended example app is generated:
React Native CLI installation –
To install this tool package-
Creating a module by using this tool-
This will create the folder react-native-mobikul-toast in which the library will be created in.
Now install dependencies by running this command in the newly created library.
How to look its folder structure-
Options with creating modules by this tool-
The alternative of this tool-
After this, we will be able to continue to Native Modules (iOS) or Native Modules (Android) to add in some code. Make sure to read the README.md within our MobikulToast Directory for platform-specific instructions on how to include the project.
We can use this library via uploading on npm server and then install it like other library-
or we can use manually- For manual use follow the following process.
We need to add our “react-native-mobikul-toast” module folder to node_modules.
For Android Setup-
Include our module setup in our setting.gradle file as like another npm library
Add module dependency in our app-level build.gradle file
For iOS Setup-
Add this module dependency in our existing project Podfile in iOS application
This is all my prospect to create a module and how to use our module to our existing Application. If you have any queries for this blog please comment.
NOTE- I will explain how to use library functions for our application in my next blog. It will come soon and link provides in this blog.
Thanks for reading my blog.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.