Utils For React Native
yarn add react-native-reanimated react-native-safe-area-context react-native-gesture-handler react-native-vector-icons react-native-redash@14.2.4 react-native-safe-area-view @types/react-native-vector-icons react-native-image-crop-picker react-native-modal-datetime-picker @react-native-community/datetimepicker
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
// imports
// Add this
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
Public Class MainActivity extends ReactActivity {
// Add this
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}
npx pod-install
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
<string>europa-bold.ttf</string>
<string>europa-light.ttf</string>
<string>europa-regular.ttf</string>
<string>Fontisto.ttf</string>
<string>Roboto_medium.ttf</string>
<string>Roboto.ttf</string>
<string>rubicon-icon-font.ttf</string>
</array>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) wants to access your camera</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) wants to access your gallery</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) wants to access your microphone</string>
import { Root } from 'react-native-all-utils';
const App = () => (
<Root>
// Components
</Root>
);
import { Alert } from 'react-native-all-utils';
// ...
Alert.show({
title: 'Alert',
description: 'Alert Description',
});
See the contributing guide to learn how to contribute to the repository and the development workflow.
Author: AshwithJoylan
Source Code: https://github.com/AshwithJoylan/react-native-all-utils
#react-native #react #mobile-apps