Git Product home page Git Product logo

boilerplatereactnative's Introduction

Welcome to the Boilerplate React Native

๐ŸŽ† Clean and minimalist React Native template for a quick start with TypeScript and so much more components.

Current version: 0.65.1

โญ Features

  • Elegant usage directly within the RN-Boiler Cli
  • Consistent with the default React Native template
  • Minimal additional dependencies
  • Lots of built-in components
  • Native modules

โ–ถ๏ธ Usage

npx rn-boiler MyApp

Preview

## Native module
import {<function_name>} from "@common" 
  • getVersion : Get app version

    const version = getVersion(); 
  • getAppName : Get app name

    const appName = getAppName(); 
  • getDeviceId : Get device id

    const deviceId = getDeviceId(); 
  • getBuildNumber : Get build number

    const buildNumber = getBuildNumber(); 
  • setAppBadges : Set app badges (IOS)

    const countBadges = 10; // 0 to clear
    setAppBadges(countBadges); 
  • clearNotification : Clear notification on notification center

    clearNotification(); 
  • clearCache : Clear cache folder

    clearCache(); 
  • checkChannelExist : Check channel Exist (Android)

    const exist: boolean = await checkChannelExist(channelId); 
  • deleteChannel : Delete channel (Android)

    deleteChannel(); 
  • createChannel : Create channel (Android)

    type Channel = {
    channelId: string;
    channelName: string;
    channelDescription?: string;
    playSound?: boolean;
    soundName?: string; // "default"
    importance?: "DEFAULT" | "HIGH" | "MAX" | "LOW" | "MIN" | "NONE" | "UNSPECIFIED" | undefined; // default HIGH
    vibrate?: boolean;
    };
    createChannel(channel: Channel); 
  • fixRotation : Fix image rotate when upload

    type Image = {
    uri: string;
    width?: number;// default 600
    height?: number;// default 800
    };
    type ImageResponse = {
    uri: string;
    name: string;
    };
    const fixedImage = await fixRotation(image: Image); 
  • MMKVStorage

type MMKVOption = {
  id: string;
  cryptKey: string;
};
const res: boolean = await MMKVStorage.setString(key: string, value: string, option?: MMKVOption)
const res: boolean = await MMKVStorage.setNumber(key: string, value: number, option?: MMKVOption)
const res: boolean = await MMKVStorage.setBoolean(key: string, value: boolean, option?: MMKVOption)
const res: string | null  = await MMKVStorage.getString(key: string, option?: MMKVOption)
const res: number  = await MMKVStorage.getNumber(key: string, option?: MMKVOption)
const res: boolean  = await MMKVStorage.getBoolean(key: string, option?: MMKVOption)
const res: Array<string>  = await MMKVStorage.getAllKeys(option?: MMKVOption)
const res: boolean  = await MMKVStorage.clearAll(option?: MMKVOption)
const res: boolean  = await MMKVStorage.delete(key: string, option?: MMKVOption)
  • registerPhotosChanges : Register photos changes (IOS) (1)

    registerPhotosChanges(); 
  • usePhotosPermissionChange : Hook to check photos permission changes (IOS). ex: Photo selected changes when ask permission (1)

    usePhotosPermissionChange(() => {
    console.log("Changed");
    });

(1): Open AppModule.swift, uncomment code to use 2 function

Library

๐Ÿ”– License

This project is MIT licensed.

boilerplatereactnative's People

Contributors

ngocle2497 avatar ngoclh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.