Skip to content

Instantly share code, notes, and snippets.

View amandeepmittal's full-sized avatar

Aman Mittal amandeepmittal

View GitHub Profile
const TIME_NOW_IN_UTC = moment.utc();
import React, { useState } from 'react';
import {
StyleSheet,
Text,
View,
TextInput,
TouchableOpacity
} from 'react-native';
import * as AddCalendarEvent from 'react-native-add-calendar-event';
import moment from 'moment';
# for iOS
react-native run-ios
<dict>
<!-- rest of the file remains same -->
<key>NSCalendarsUsageDescription</key>
<!-- this is a custom message that you can modify the display -->
<string>Are you sure you want to allow this app to use Calendar?</string>
<key>NSContactsUsageDescription</key>
<string></string>
</dict>
npx pod-install
yarn add react-native-add-calendar-event moment
# for iOS
react-native run-ios
# for Android
react-native run-android
npx react-native init rncalendareventexample
# after the project directory is created
cd rncalendareventexample
# make sure you have npx installed
npx pod-install

Getting Started with React Native and Expo using Hooks

We live in the world of a variety of mobile devices majorly dominated by two platforms, iOS, and Android. It is a two-horse race and I am sure we can all agree on that. Building a mobile application is not an easy task though.

For iOS, you write code using Objective-C or Swift and for Android, you will find yourself using Java or Kotlin. Apart from different programming languages used to create a mobile that can run on each of the two platforms, the toolchains are entirely different too for both of these mobile platforms.

Many modern-day developers use a specific set of technology that is used to build web applications: HTML, CSS, and JavaScript. Different frameworks fall under the category commonly known as Hybrid applications. You can use almost one set of source code for developing the application for both iOS and Android platforms.

In recent years, hybrid frameworks have evolved coming from web view to use native APIs. This cross-platform approa

// WITH VIEW
import React, { Component } from 'react'
import {
StyleSheet,
View,
Image,
SafeAreaView,
TouchableOpacity
} from 'react-native'