Skip to content

Exercise 10 : Native Module - Calendar Native Module

Purpose and learning process

In this exercise you will learn how to build a Android or iOS native module Create a Calendar Native Module to your React Native app.

Native Module

Sometimes an app needs access to a platform API that React Native doesn't have a corresponding module for yet. Maybe you want to reuse some existing Java code without having to reimplement it in JavaScript, or write some high performance, multi-threaded code such as for image processing, a database, or any number of advanced extensions.

React Native is designed such that it is possible for you to write real native code and have access to the full power of the platform. If React Native doesn't support a native feature that you need, you should be able to build it yourself.

Project

Create a new CalendarNativeModule React Native project.

1
npx react-native init CalendarNativeModule

Tutorial

Follow React Native site Android Native Modules or iOS Native Modules tutorial and complete a Calendar Native Module to your app.

Push to GitLab

Test your application in emulator, take screenshots (add those to your project folder) and commit/push your mobile-exercises repository back to JAMKIT/GitLab. Remember move your exercise/issue ticket from Doing to In Review in Issues Board and write your learning comments to issue comments.