132 | ```
133 |
134 | ### Install Pods (iOS Only)
135 |
136 | - `npm i`
137 | - `cd ios && pod install`
138 | - `cd .. && react-native run-ios/android`
139 |
140 | ### Android local.properties (Android Only)
141 |
142 | - `npm i`
143 | - `cd android && mkdir local.properties`
144 | - `nano local.properties`
145 |
146 | #### Example of MacOS Android SDK Path
147 |
148 | Make sure that set your right path of Android **SDK**
149 |
150 | ##### MacOS / Linux
151 |
152 | Replace your machine name instead of `username`
153 |
154 | ```
155 | sdk.dir=/Users/username/Library/Android/sdk
156 | ```
157 |
158 | ##### Windows
159 |
160 | Replace your machine name instead of `username`
161 |
162 | ```
163 | sdk.dir=/Users/username/Library/Android/sdk
164 | ```
165 |
166 | - `cd .. & react-native run-ios/android`
167 |
168 | # 📃 Documentations
169 |
170 | - [Components](./docs/components.md)
171 | - [Axios Hooks](./docs/axios-hooks.md)
172 | - [Custom Redux](./docs/redux.md)
173 | - [Event Emitter Usage](./docs/event-emitter.md)
174 | - [Project Structure](./docs/project-structure.md)
175 |
176 | ## Are you looking for Non-Redux Version?
177 |
178 | ### [React Native Typescript Boilerplate](https://github.com/WrathChaos/react-native-typescript-boilerplate)
179 |
180 | # 🔮 Roadmap
181 |
182 | - [x] ~~LICENSE~~
183 | - [x] ~~Better Husky: Linter, Prettier and Commintlint~~
184 | - [x] ~~Removal of `react-native-animated-splash-screen`~~
185 | - [x] ~~New Theme Support with React Navigation~~
186 | - [x] ~~Implement the native splash screen with [react-native-splash-screen](https://github.com/crazycodeboy/react-native-splash-screen)~~
187 | - [x] ~~Better and separated documentation~~
188 | - [x] ~~Axios Hooks~~
189 | - [x] ~~React Native New Architecture~~
190 | - [x] ~~`Redux` Fork Version~~
191 | - [ ] `Babel Plugin Module Resolver` Documentation with Example
192 | - [ ] `Navigation Service` Documentation with Example
193 | - [ ] `Localization` Documentation with Example
194 | - [ ] `Theme` Documentation with Example
195 | - [ ] `FAQ` Documentation
196 | - [ ] `Website` for the boilerplate
197 | - [ ] Splash Screen Documentation
198 | - [ ] `Detox E2E` Integration Fork Version
199 | - [ ] `MobX State Tree` Fork Version
200 | - [ ] Write an article about the lib on `Medium`
201 | - [ ] Write an article about the lib on `DevTo`
202 |
203 | ## Credits
204 |
205 | Photo by Shifaaz shamoon on Unsplash
206 |
207 | Photo by Jamie Street on Unsplash
208 |
209 | ## Author
210 |
211 | FreakyCoder, kurayogun@gmail.com
212 |
213 | ## License
214 |
215 | React Native Typescript Redux Boilerplate is available under the MIT license. See the LICENSE file for more info.
216 |
--------------------------------------------------------------------------------
/__tests__/App-test.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/android/app/_BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.rntypescriptboilerplate",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.rntypescriptboilerplate",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 | apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
3 |
4 | import com.android.build.OutputFile
5 |
6 | project.ext.react = [
7 | enableHermes: false, // clean and rebuild if changing
8 | ]
9 |
10 | apply from: "../../node_modules/react-native/react.gradle"
11 |
12 | def enableSeparateBuildPerCPUArchitecture = false
13 | def enableProguardInReleaseBuilds = false
14 | def jscFlavor = 'org.webkit:android-jsc:+'
15 | def enableHermes = project.ext.react.get("enableHermes", false);
16 |
17 | def reactNativeArchitectures() {
18 | def value = project.getProperties().get("reactNativeArchitectures")
19 | return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
20 | }
21 |
22 | android {
23 | ndkVersion rootProject.ext.ndkVersion
24 |
25 | compileSdkVersion rootProject.ext.compileSdkVersion
26 |
27 | // ? You can remove if you don't want to use JAVA Version 18
28 | compileOptions {
29 | sourceCompatibility JavaVersion.VERSION_1_8
30 | targetCompatibility JavaVersion.VERSION_1_8
31 | }
32 |
33 | defaultConfig {
34 | applicationId "com.rntypescriptboilerplate"
35 | minSdkVersion rootProject.ext.minSdkVersion
36 | targetSdkVersion rootProject.ext.targetSdkVersion
37 | versionCode 1
38 | versionName "1.0"
39 | buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
40 |
41 | if (isNewArchitectureEnabled()) {
42 | // We configure the NDK build only if you decide to opt-in for the New Architecture.
43 | externalNativeBuild {
44 | ndkBuild {
45 | arguments "APP_PLATFORM=android-21",
46 | "APP_STL=c++_shared",
47 | "NDK_TOOLCHAIN_VERSION=clang",
48 | "GENERATED_SRC_DIR=$buildDir/generated/source",
49 | "PROJECT_BUILD_DIR=$buildDir",
50 | "REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
51 | "REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
52 | "NODE_MODULES_DIR=$rootDir/../node_modules"
53 | cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
54 | cppFlags "-std=c++17"
55 | // Make sure this target name is the same you specify inside the
56 | // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
57 | targets "rntypescriptboilerplate_appmodules"
58 | }
59 | }
60 | if (!enableSeparateBuildPerCPUArchitecture) {
61 | ndk {
62 | abiFilters (*reactNativeArchitectures())
63 | }
64 | }
65 | }
66 | }
67 |
68 | if (isNewArchitectureEnabled()) {
69 | // We configure the NDK build only if you decide to opt-in for the New Architecture.
70 | externalNativeBuild {
71 | ndkBuild {
72 | path "$projectDir/src/main/jni/Android.mk"
73 | }
74 | }
75 | def reactAndroidProjectDir = project(':ReactAndroid').projectDir
76 | def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
77 | dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
78 | from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
79 | into("$buildDir/react-ndk/exported")
80 | }
81 | def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
82 | dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
83 | from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
84 | into("$buildDir/react-ndk/exported")
85 | }
86 | afterEvaluate {
87 | // If you wish to add a custom TurboModule or component locally,
88 | // you should uncomment this line.
89 | // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
90 | preDebugBuild.dependsOn(packageReactNdkDebugLibs)
91 | preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
92 |
93 | // Due to a bug inside AGP, we have to explicitly set a dependency
94 | // between configureNdkBuild* tasks and the preBuild tasks.
95 | // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
96 | configureNdkBuildRelease.dependsOn(preReleaseBuild)
97 | configureNdkBuildDebug.dependsOn(preDebugBuild)
98 | reactNativeArchitectures().each { architecture ->
99 | tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
100 | dependsOn("preDebugBuild")
101 | }
102 | tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
103 | dependsOn("preReleaseBuild")
104 | }
105 | }
106 | }
107 | }
108 |
109 | splits {
110 | abi {
111 | reset()
112 | enable enableSeparateBuildPerCPUArchitecture
113 | universalApk false // If true, also generate a universal APK
114 | include (*reactNativeArchitectures())
115 | }
116 | }
117 | signingConfigs {
118 | debug {
119 | storeFile file('debug.keystore')
120 | storePassword 'android'
121 | keyAlias 'androiddebugkey'
122 | keyPassword 'android'
123 | }
124 | }
125 | buildTypes {
126 | debug {
127 | signingConfig signingConfigs.debug
128 | }
129 | release {
130 | // Caution! In production, you need to generate your own keystore file.
131 | // see https://reactnative.dev/docs/signed-apk-android.
132 | signingConfig signingConfigs.debug
133 | minifyEnabled enableProguardInReleaseBuilds
134 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
135 | }
136 | }
137 |
138 | // applicationVariants are e.g. debug, release
139 | applicationVariants.all { variant ->
140 | variant.outputs.each { output ->
141 | // For each separate APK per architecture, set a unique version code as described here:
142 | // https://developer.android.com/studio/build/configure-apk-splits.html
143 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
144 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
145 | def abi = output.getFilter(OutputFile.ABI)
146 | if (abi != null) { // null for the universal-debug, universal-release variants
147 | output.versionCodeOverride =
148 | defaultConfig.versionCode * 1000 + versionCodes.get(abi)
149 | }
150 |
151 | }
152 | }
153 |
154 | packagingOptions {
155 | pickFirst '**/armeabi-v7a/libc++_shared.so'
156 | pickFirst '**/x86/libc++_shared.so'
157 | pickFirst '**/arm64-v8a/libc++_shared.so'
158 | pickFirst '**/x86_64/libc++_shared.so'
159 | pickFirst '**/x86/libjsc.so'
160 | pickFirst '**/armeabi-v7a/libjsc.so'
161 | }
162 | }
163 |
164 | dependencies {
165 | implementation fileTree(dir: "libs", include: ["*.jar"])
166 |
167 | //noinspection GradleDynamicVersion
168 | implementation "com.facebook.react:react-native:+" // From node_modules
169 |
170 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
171 |
172 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
173 | exclude group:'com.facebook.fbjni'
174 | }
175 |
176 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
177 | exclude group:'com.facebook.flipper'
178 | exclude group:'com.squareup.okhttp3', module:'okhttp'
179 | }
180 |
181 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
182 | exclude group:'com.facebook.flipper'
183 | }
184 |
185 | if (enableHermes) {
186 | //noinspection GradleDynamicVersion
187 | implementation("com.facebook.react:hermes-engine:+") { // From node_modules
188 | exclude group:'com.facebook.fbjni'
189 | }
190 | } else {
191 | implementation jscFlavor
192 | }
193 | }
194 |
195 | if (isNewArchitectureEnabled()) {
196 | // If new architecture is enabled, we let you build RN from source
197 | // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
198 | // This will be applied to all the imported transtitive dependency.
199 | configurations.all {
200 | resolutionStrategy.dependencySubstitution {
201 | substitute(module("com.facebook.react:react-native"))
202 | .using(project(":ReactAndroid"))
203 | .because("On New Architecture we're building React Native from source")
204 | substitute(module("com.facebook.react:hermes-engine"))
205 | .using(project(":ReactAndroid:hermes-engine"))
206 | .because("On New Architecture we're building Hermes from source")
207 | }
208 | }
209 | }
210 |
211 | // Run this once to be able to run the application with BUCK
212 | // puts all compile dependencies into folder libs for BUCK to use
213 | task copyDownloadableDepsToLibs(type: Copy) {
214 | from configurations.implementation
215 | into 'libs'
216 | }
217 |
218 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
219 |
220 | def isNewArchitectureEnabled() {
221 | // To opt-in for the New Architecture, you can either:
222 | // - Set `newArchEnabled` to true inside the `gradle.properties` file
223 | // - Invoke gradle with `-newArchEnabled=true`
224 | // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
225 | return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
226 | }
227 |
--------------------------------------------------------------------------------
/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/debug.keystore
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/android/app/src/debug/java/com/rntypescriptboilerplate/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.rntypescriptboilerplate;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22 | import com.facebook.react.ReactInstanceEventListener;
23 | import com.facebook.react.ReactInstanceManager;
24 | import com.facebook.react.bridge.ReactContext;
25 | import com.facebook.react.modules.network.NetworkingModule;
26 | import okhttp3.OkHttpClient;
27 |
28 | public class ReactNativeFlipper {
29 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
30 | if (FlipperUtils.shouldEnableFlipper(context)) {
31 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
32 |
33 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
34 | client.addPlugin(new ReactFlipperPlugin());
35 | client.addPlugin(new DatabasesFlipperPlugin(context));
36 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
37 | client.addPlugin(CrashReporterPlugin.getInstance());
38 |
39 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
40 | NetworkingModule.setCustomClientBuilder(
41 | new NetworkingModule.CustomClientBuilder() {
42 | @Override
43 | public void apply(OkHttpClient.Builder builder) {
44 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
45 | }
46 | });
47 | client.addPlugin(networkFlipperPlugin);
48 | client.start();
49 |
50 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
51 | // Hence we run if after all native modules have been initialized
52 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
53 | if (reactContext == null) {
54 | reactInstanceManager.addReactInstanceEventListener(
55 | new ReactInstanceEventListener() {
56 | @Override
57 | public void onReactContextInitialized(ReactContext reactContext) {
58 | reactInstanceManager.removeReactInstanceEventListener(this);
59 | reactContext.runOnNativeModulesQueueThread(
60 | new Runnable() {
61 | @Override
62 | public void run() {
63 | client.addPlugin(new FrescoFlipperPlugin());
64 | }
65 | });
66 | }
67 | });
68 | } else {
69 | client.addPlugin(new FrescoFlipperPlugin());
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-Black.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-BlackItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-Bold.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-BoldItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-ExtraBold.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-ExtraBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-ExtraBoldItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-ExtraLight.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-ExtraLightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-ExtraLightItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-Italic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-Light.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-LightItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-MediumItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-SemiBold.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-SemiBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-SemiBoldItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-Thin.ttf
--------------------------------------------------------------------------------
/android/app/src/main/assets/fonts/Montserrat-ThinItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/assets/fonts/Montserrat-ThinItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-Black.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-BlackItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-Bold.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-BoldItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-ExtraBold.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-ExtraBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-ExtraBoldItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-ExtraLight.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-ExtraLightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-ExtraLightItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-Italic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-Light.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-LightItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-MediumItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-SemiBold.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-SemiBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-SemiBoldItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-Thin.ttf
--------------------------------------------------------------------------------
/android/app/src/main/fonts/Montserrat-ThinItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/fonts/Montserrat-ThinItalic.ttf
--------------------------------------------------------------------------------
/android/app/src/main/java/com/rntypescriptboilerplate/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.rntypescriptboilerplate;
2 | import android.os.Bundle;
3 | import com.facebook.react.ReactActivity;
4 | import com.facebook.react.ReactActivityDelegate;
5 | import com.facebook.react.ReactRootView;
6 | import org.devio.rn.splashscreen.SplashScreen;
7 |
8 | public class MainActivity extends ReactActivity {
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | SplashScreen.show(this);
12 | super.onCreate(savedInstanceState);
13 | }
14 | /**
15 | * Returns the name of the main component registered from JavaScript. This is used to schedule
16 | * rendering of the component.
17 | */
18 | @Override
19 | protected String getMainComponentName() {
20 | return "RNTypescriptBoilerplate";
21 | }
22 |
23 | /**
24 | * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
25 | * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
26 | * (Paper).
27 | */
28 | @Override
29 | protected ReactActivityDelegate createReactActivityDelegate() {
30 | return new MainActivityDelegate(this, getMainComponentName());
31 | }
32 |
33 | public static class MainActivityDelegate extends ReactActivityDelegate {
34 | public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
35 | super(activity, mainComponentName);
36 | }
37 |
38 | @Override
39 | protected ReactRootView createRootView() {
40 | ReactRootView reactRootView = new ReactRootView(getContext());
41 | // If you opted-in for the New Architecture, we enable the Fabric Renderer.
42 | reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
43 | return reactRootView;
44 | }
45 |
46 | @Override
47 | protected boolean isConcurrentRootEnabled() {
48 | // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
49 | // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
50 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/rntypescriptboilerplate/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.rntypescriptboilerplate;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactApplication;
7 | import com.facebook.react.ReactInstanceManager;
8 | import com.facebook.react.ReactNativeHost;
9 | import com.facebook.react.ReactPackage;
10 | import com.facebook.react.config.ReactFeatureFlags;
11 | import com.facebook.soloader.SoLoader;
12 | import com.rntypescriptboilerplate.newarchitecture.MainApplicationReactNativeHost;
13 | import java.lang.reflect.InvocationTargetException;
14 | import java.util.List;
15 | import com.facebook.react.bridge.JSIModulePackage;
16 | import com.swmansion.reanimated.ReanimatedJSIModulePackage;
17 |
18 | public class MainApplication extends Application implements ReactApplication {
19 |
20 | private final ReactNativeHost mReactNativeHost =
21 | new ReactNativeHost(this) {
22 | @Override
23 | public boolean getUseDeveloperSupport() {
24 | return BuildConfig.DEBUG;
25 | }
26 |
27 | @Override
28 | protected List getPackages() {
29 | @SuppressWarnings("UnnecessaryLocalVariable")
30 | List packages = new PackageList(this).getPackages();
31 | // Packages that cannot be autolinked yet can be added manually here, for example:
32 | // packages.add(new MyReactNativePackage());
33 | return packages;
34 | }
35 |
36 | @Override
37 | protected String getJSMainModuleName() {
38 | return "index";
39 | }
40 |
41 | @Override
42 | protected JSIModulePackage getJSIModulePackage() {
43 | return new ReanimatedJSIModulePackage();
44 | }
45 | };
46 |
47 | private final ReactNativeHost mNewArchitectureNativeHost =
48 | new MainApplicationReactNativeHost(this);
49 |
50 | @Override
51 | public ReactNativeHost getReactNativeHost() {
52 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
53 | return mNewArchitectureNativeHost;
54 | } else {
55 | return mReactNativeHost;
56 | }
57 | }
58 |
59 | @Override
60 | public void onCreate() {
61 | super.onCreate();
62 | // If you opted-in for the New Architecture, we enable the TurboModule system
63 | ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
64 | SoLoader.init(this, /* native exopackage */ false);
65 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
66 | }
67 |
68 | /**
69 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like
70 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
71 | *
72 | * @param context
73 | * @param reactInstanceManager
74 | */
75 | private static void initializeFlipper(
76 | Context context, ReactInstanceManager reactInstanceManager) {
77 | if (BuildConfig.DEBUG) {
78 | try {
79 | /*
80 | We use reflection here to pick up the class that initializes Flipper,
81 | since Flipper library is not available in release mode
82 | */
83 | Class> aClass = Class.forName("com.rntypescriptboilerplate.ReactNativeFlipper");
84 | aClass
85 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
86 | .invoke(null, context, reactInstanceManager);
87 | } catch (ClassNotFoundException e) {
88 | e.printStackTrace();
89 | } catch (NoSuchMethodException e) {
90 | e.printStackTrace();
91 | } catch (IllegalAccessException e) {
92 | e.printStackTrace();
93 | } catch (InvocationTargetException e) {
94 | e.printStackTrace();
95 | }
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/rntypescriptboilerplate/newarchitecture/MainApplicationReactNativeHost.java:
--------------------------------------------------------------------------------
1 | package com.rntypescriptboilerplate.newarchitecture;
2 |
3 | import android.app.Application;
4 | import androidx.annotation.NonNull;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactInstanceManager;
7 | import com.facebook.react.ReactNativeHost;
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
10 | import com.facebook.react.bridge.JSIModulePackage;
11 | import com.facebook.react.bridge.JSIModuleProvider;
12 | import com.facebook.react.bridge.JSIModuleSpec;
13 | import com.facebook.react.bridge.JSIModuleType;
14 | import com.facebook.react.bridge.JavaScriptContextHolder;
15 | import com.facebook.react.bridge.ReactApplicationContext;
16 | import com.facebook.react.bridge.UIManager;
17 | import com.facebook.react.fabric.ComponentFactory;
18 | import com.facebook.react.fabric.CoreComponentsRegistry;
19 | import com.facebook.react.fabric.EmptyReactNativeConfig;
20 | import com.facebook.react.fabric.ReactNativeConfig;
21 | import com.facebook.react.fabric.FabricJSIModuleProvider;
22 | import com.facebook.react.uimanager.ViewManagerRegistry;
23 | import com.rntypescriptboilerplate.BuildConfig;
24 | import com.rntypescriptboilerplate.newarchitecture.components.MainComponentsRegistry;
25 | import com.rntypescriptboilerplate.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 |
29 | /**
30 | * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
31 | * TurboModule delegates and the Fabric Renderer.
32 | *
33 | * Please note that this class is used ONLY if you opt-in for the New Architecture (see the
34 | * `newArchEnabled` property). Is ignored otherwise.
35 | */
36 | public class MainApplicationReactNativeHost extends ReactNativeHost {
37 | public MainApplicationReactNativeHost(Application application) {
38 | super(application);
39 | }
40 |
41 | @Override
42 | public boolean getUseDeveloperSupport() {
43 | return BuildConfig.DEBUG;
44 | }
45 |
46 | @Override
47 | protected List getPackages() {
48 | List packages = new PackageList(this).getPackages();
49 | // Packages that cannot be autolinked yet can be added manually here, for example:
50 | // packages.add(new MyReactNativePackage());
51 | // TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
52 | // packages.add(new TurboReactPackage() { ... });
53 | // If you have custom Fabric Components, their ViewManagers should also be loaded here
54 | // inside a ReactPackage.
55 | return packages;
56 | }
57 |
58 | @Override
59 | protected String getJSMainModuleName() {
60 | return "index";
61 | }
62 |
63 | @NonNull
64 | @Override
65 | protected ReactPackageTurboModuleManagerDelegate.Builder
66 | getReactPackageTurboModuleManagerDelegateBuilder() {
67 | // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary
68 | // for the new architecture and to use TurboModules correctly.
69 | return new MainApplicationTurboModuleManagerDelegate.Builder();
70 | }
71 |
72 | @Override
73 | protected JSIModulePackage getJSIModulePackage() {
74 | return new JSIModulePackage() {
75 | @Override
76 | public List getJSIModules(
77 | final ReactApplicationContext reactApplicationContext,
78 | final JavaScriptContextHolder jsContext) {
79 | final List specs = new ArrayList<>();
80 |
81 | // Here we provide a new JSIModuleSpec that will be responsible of providing the
82 | // custom Fabric Components.
83 | specs.add(
84 | new JSIModuleSpec() {
85 | @Override
86 | public JSIModuleType getJSIModuleType() {
87 | return JSIModuleType.UIManager;
88 | }
89 |
90 | @Override
91 | public JSIModuleProvider getJSIModuleProvider() {
92 | final ComponentFactory componentFactory = new ComponentFactory();
93 | CoreComponentsRegistry.register(componentFactory);
94 |
95 | // Here we register a Components Registry.
96 | // The one that is generated with the template contains no components
97 | // and just provides you the one from React Native core.
98 | MainComponentsRegistry.register(componentFactory);
99 |
100 | final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
101 |
102 | ViewManagerRegistry viewManagerRegistry =
103 | new ViewManagerRegistry(
104 | reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
105 |
106 | return new FabricJSIModuleProvider(
107 | reactApplicationContext,
108 | componentFactory,
109 | ReactNativeConfig.DEFAULT_CONFIG,
110 | viewManagerRegistry);
111 | }
112 | });
113 | return specs;
114 | }
115 | };
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/rntypescriptboilerplate/newarchitecture/components/MainComponentsRegistry.java:
--------------------------------------------------------------------------------
1 | package com.rntypescriptboilerplate.newarchitecture.components;
2 |
3 | import com.facebook.jni.HybridData;
4 | import com.facebook.proguard.annotations.DoNotStrip;
5 | import com.facebook.react.fabric.ComponentFactory;
6 | import com.facebook.soloader.SoLoader;
7 |
8 | /**
9 | * Class responsible to load the custom Fabric Components. This class has native methods and needs a
10 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
11 | * folder for you).
12 | *
13 | * Please note that this class is used ONLY if you opt-in for the New Architecture (see the
14 | * `newArchEnabled` property). Is ignored otherwise.
15 | */
16 | @DoNotStrip
17 | public class MainComponentsRegistry {
18 | static {
19 | SoLoader.loadLibrary("fabricjni");
20 | }
21 |
22 | @DoNotStrip private final HybridData mHybridData;
23 |
24 | @DoNotStrip
25 | private native HybridData initHybrid(ComponentFactory componentFactory);
26 |
27 | @DoNotStrip
28 | private MainComponentsRegistry(ComponentFactory componentFactory) {
29 | mHybridData = initHybrid(componentFactory);
30 | }
31 |
32 | @DoNotStrip
33 | public static MainComponentsRegistry register(ComponentFactory componentFactory) {
34 | return new MainComponentsRegistry(componentFactory);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/rntypescriptboilerplate/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java:
--------------------------------------------------------------------------------
1 | package com.rntypescriptboilerplate.newarchitecture.modules;
2 |
3 | import com.facebook.jni.HybridData;
4 | import com.facebook.react.ReactPackage;
5 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
6 | import com.facebook.react.bridge.ReactApplicationContext;
7 | import com.facebook.soloader.SoLoader;
8 | import java.util.List;
9 |
10 | /**
11 | * Class responsible to load the TurboModules. This class has native methods and needs a
12 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
13 | * folder for you).
14 | *
15 | *
Please note that this class is used ONLY if you opt-in for the New Architecture (see the
16 | * `newArchEnabled` property). Is ignored otherwise.
17 | */
18 | public class MainApplicationTurboModuleManagerDelegate
19 | extends ReactPackageTurboModuleManagerDelegate {
20 |
21 | private static volatile boolean sIsSoLibraryLoaded;
22 |
23 | protected MainApplicationTurboModuleManagerDelegate(
24 | ReactApplicationContext reactApplicationContext, List packages) {
25 | super(reactApplicationContext, packages);
26 | }
27 |
28 | protected native HybridData initHybrid();
29 |
30 | native boolean canCreateTurboModule(String moduleName);
31 |
32 | public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder {
33 | protected MainApplicationTurboModuleManagerDelegate build(
34 | ReactApplicationContext context, List packages) {
35 | return new MainApplicationTurboModuleManagerDelegate(context, packages);
36 | }
37 | }
38 |
39 | @Override
40 | protected synchronized void maybeLoadOtherSoLibraries() {
41 | if (!sIsSoLibraryLoaded) {
42 | // If you change the name of your application .so file in the Android.mk file,
43 | // make sure you update the name here as well.
44 | SoLoader.loadLibrary("rntypescriptboilerplate_appmodules");
45 | sIsSoLibraryLoaded = true;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/Android.mk:
--------------------------------------------------------------------------------
1 | THIS_DIR := $(call my-dir)
2 |
3 | include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
4 |
5 | # If you wish to add a custom TurboModule or Fabric component in your app you
6 | # will have to include the following autogenerated makefile.
7 | # include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
8 | include $(CLEAR_VARS)
9 |
10 | LOCAL_PATH := $(THIS_DIR)
11 |
12 | # You can customize the name of your application .so file here.
13 | LOCAL_MODULE := rntypescriptboilerplate_appmodules
14 |
15 | LOCAL_C_INCLUDES := $(LOCAL_PATH)
16 | LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
17 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
18 |
19 | # If you wish to add a custom TurboModule or Fabric component in your app you
20 | # will have to uncomment those lines to include the generated source
21 | # files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
22 | #
23 | # LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
24 | # LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
25 | # LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
26 |
27 | # Here you should add any native library you wish to depend on.
28 | LOCAL_SHARED_LIBRARIES := \
29 | libfabricjni \
30 | libfbjni \
31 | libfolly_runtime \
32 | libglog \
33 | libjsi \
34 | libreact_codegen_rncore \
35 | libreact_debug \
36 | libreact_nativemodule_core \
37 | libreact_render_componentregistry \
38 | libreact_render_core \
39 | libreact_render_debug \
40 | libreact_render_graphics \
41 | librrc_view \
42 | libruntimeexecutor \
43 | libturbomodulejsijni \
44 | libyoga
45 |
46 | LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
47 |
48 | include $(BUILD_SHARED_LIBRARY)
49 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainApplicationModuleProvider.cpp:
--------------------------------------------------------------------------------
1 | #include "MainApplicationModuleProvider.h"
2 |
3 | #include
4 |
5 | namespace facebook {
6 | namespace react {
7 |
8 | std::shared_ptr MainApplicationModuleProvider(
9 | const std::string moduleName,
10 | const JavaTurboModule::InitParams ¶ms) {
11 | // Here you can provide your own module provider for TurboModules coming from
12 | // either your application or from external libraries. The approach to follow
13 | // is similar to the following (for a library called `samplelibrary`:
14 | //
15 | // auto module = samplelibrary_ModuleProvider(moduleName, params);
16 | // if (module != nullptr) {
17 | // return module;
18 | // }
19 | // return rncore_ModuleProvider(moduleName, params);
20 | return rncore_ModuleProvider(moduleName, params);
21 | }
22 |
23 | } // namespace react
24 | } // namespace facebook
25 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainApplicationModuleProvider.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #include
7 |
8 | namespace facebook {
9 | namespace react {
10 |
11 | std::shared_ptr MainApplicationModuleProvider(
12 | const std::string moduleName,
13 | const JavaTurboModule::InitParams ¶ms);
14 |
15 | } // namespace react
16 | } // namespace facebook
17 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp:
--------------------------------------------------------------------------------
1 | #include "MainApplicationTurboModuleManagerDelegate.h"
2 | #include "MainApplicationModuleProvider.h"
3 |
4 | namespace facebook {
5 | namespace react {
6 |
7 | jni::local_ref
8 | MainApplicationTurboModuleManagerDelegate::initHybrid(
9 | jni::alias_ref) {
10 | return makeCxxInstance();
11 | }
12 |
13 | void MainApplicationTurboModuleManagerDelegate::registerNatives() {
14 | registerHybrid({
15 | makeNativeMethod(
16 | "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
17 | makeNativeMethod(
18 | "canCreateTurboModule",
19 | MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
20 | });
21 | }
22 |
23 | std::shared_ptr
24 | MainApplicationTurboModuleManagerDelegate::getTurboModule(
25 | const std::string name,
26 | const std::shared_ptr jsInvoker) {
27 | // Not implemented yet: provide pure-C++ NativeModules here.
28 | return nullptr;
29 | }
30 |
31 | std::shared_ptr
32 | MainApplicationTurboModuleManagerDelegate::getTurboModule(
33 | const std::string name,
34 | const JavaTurboModule::InitParams ¶ms) {
35 | return MainApplicationModuleProvider(name, params);
36 | }
37 |
38 | bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
39 | std::string name) {
40 | return getTurboModule(name, nullptr) != nullptr ||
41 | getTurboModule(name, {.moduleName = name}) != nullptr;
42 | }
43 |
44 | } // namespace react
45 | } // namespace facebook
46 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include
5 | #include
6 |
7 | namespace facebook {
8 | namespace react {
9 |
10 | class MainApplicationTurboModuleManagerDelegate
11 | : public jni::HybridClass<
12 | MainApplicationTurboModuleManagerDelegate,
13 | TurboModuleManagerDelegate> {
14 | public:
15 | // Adapt it to the package you used for your Java class.
16 | static constexpr auto kJavaDescriptor =
17 | "Lcom/rntypescriptboilerplate/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
18 |
19 | static jni::local_ref initHybrid(jni::alias_ref);
20 |
21 | static void registerNatives();
22 |
23 | std::shared_ptr getTurboModule(
24 | const std::string name,
25 | const std::shared_ptr jsInvoker) override;
26 | std::shared_ptr getTurboModule(
27 | const std::string name,
28 | const JavaTurboModule::InitParams ¶ms) override;
29 |
30 | /**
31 | * Test-only method. Allows user to verify whether a TurboModule can be
32 | * created by instances of this class.
33 | */
34 | bool canCreateTurboModule(std::string name);
35 | };
36 |
37 | } // namespace react
38 | } // namespace facebook
39 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainComponentsRegistry.cpp:
--------------------------------------------------------------------------------
1 | #include "MainComponentsRegistry.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | namespace facebook {
9 | namespace react {
10 |
11 | MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
12 |
13 | std::shared_ptr
14 | MainComponentsRegistry::sharedProviderRegistry() {
15 | auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
16 |
17 | // Custom Fabric Components go here. You can register custom
18 | // components coming from your App or from 3rd party libraries here.
19 | //
20 | // providerRegistry->add(concreteComponentDescriptorProvider<
21 | // AocViewerComponentDescriptor>());
22 | return providerRegistry;
23 | }
24 |
25 | jni::local_ref
26 | MainComponentsRegistry::initHybrid(
27 | jni::alias_ref,
28 | ComponentFactory *delegate) {
29 | auto instance = makeCxxInstance(delegate);
30 |
31 | auto buildRegistryFunction =
32 | [](EventDispatcher::Weak const &eventDispatcher,
33 | ContextContainer::Shared const &contextContainer)
34 | -> ComponentDescriptorRegistry::Shared {
35 | auto registry = MainComponentsRegistry::sharedProviderRegistry()
36 | ->createComponentDescriptorRegistry(
37 | {eventDispatcher, contextContainer});
38 |
39 | auto mutableRegistry =
40 | std::const_pointer_cast(registry);
41 |
42 | mutableRegistry->setFallbackComponentDescriptor(
43 | std::make_shared(
44 | ComponentDescriptorParameters{
45 | eventDispatcher, contextContainer, nullptr}));
46 |
47 | return registry;
48 | };
49 |
50 | delegate->buildRegistryFunction = buildRegistryFunction;
51 | return instance;
52 | }
53 |
54 | void MainComponentsRegistry::registerNatives() {
55 | registerHybrid({
56 | makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
57 | });
58 | }
59 |
60 | } // namespace react
61 | } // namespace facebook
62 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/MainComponentsRegistry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | namespace facebook {
9 | namespace react {
10 |
11 | class MainComponentsRegistry
12 | : public facebook::jni::HybridClass {
13 | public:
14 | // Adapt it to the package you used for your Java class.
15 | constexpr static auto kJavaDescriptor =
16 | "Lcom/rntypescriptboilerplate/newarchitecture/components/MainComponentsRegistry;";
17 |
18 | static void registerNatives();
19 |
20 | MainComponentsRegistry(ComponentFactory *delegate);
21 |
22 | private:
23 | static std::shared_ptr
24 | sharedProviderRegistry();
25 |
26 | static jni::local_ref initHybrid(
27 | jni::alias_ref,
28 | ComponentFactory *delegate);
29 | };
30 |
31 | } // namespace react
32 | } // namespace facebook
33 |
--------------------------------------------------------------------------------
/android/app/src/main/jni/OnLoad.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "MainApplicationTurboModuleManagerDelegate.h"
3 | #include "MainComponentsRegistry.h"
4 |
5 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
6 | return facebook::jni::initialize(vm, [] {
7 | facebook::react::MainApplicationTurboModuleManagerDelegate::
8 | registerNatives();
9 | facebook::react::MainComponentsRegistry::registerNatives();
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/launch_screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/drawable-hdpi/launch_screen.jpg
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/launch_screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/drawable-mdpi/launch_screen.jpg
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/launch_screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/drawable-xhdpi/launch_screen.jpg
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/launch_screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/drawable-xxhdpi/launch_screen.jpg
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/launch_screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/drawable-xxxhdpi/launch_screen.jpg
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
21 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/launch_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #000000
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | RNTypescriptBoilerplate
3 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | import org.apache.tools.ant.taskdefs.condition.Os
2 |
3 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
4 |
5 | buildscript {
6 | ext {
7 | buildToolsVersion = "31.0.0"
8 | minSdkVersion = 21
9 | compileSdkVersion = 31
10 | targetSdkVersion = 31
11 |
12 | if (System.properties['os.arch'] == "aarch64") {
13 | // For M1 Users we need to use the NDK 24 which added support for aarch64
14 | ndkVersion = "24.0.8215888"
15 | } else {
16 | // Otherwise we default to the side-by-side NDK version from AGP.
17 | ndkVersion = "21.4.7075529"
18 | }
19 | }
20 | repositories {
21 | google()
22 | mavenCentral()
23 | }
24 | dependencies {
25 | classpath("com.android.tools.build:gradle:7.1.1")
26 | classpath("com.facebook.react:react-native-gradle-plugin")
27 | classpath("de.undercouch:gradle-download-task:5.0.1")
28 | // NOTE: Do not place your application dependencies here; they belong
29 | // in the individual module build.gradle files
30 | }
31 | }
32 |
33 | allprojects {
34 | repositories {
35 | maven {
36 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
37 | url("$rootDir/../node_modules/react-native/android")
38 | }
39 | maven {
40 | // Android JSC is installed from npm
41 | url("$rootDir/../node_modules/jsc-android/dist")
42 | }
43 | mavenCentral {
44 | // We don't want to fetch react-native from Maven Central as there are
45 | // older versions over there.
46 | content {
47 | excludeGroup "com.facebook.react"
48 | }
49 | }
50 | google()
51 | maven { url 'https://www.jitpack.io' }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.145.0
29 |
30 | # Use this property to specify which architecture you want to build.
31 | # You can also override it from the CLI using
32 | # ./gradlew -PreactNativeArchitectures=x86_64
33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
34 |
35 | # Use this property to enable support to the new architecture.
36 | # This will allow you to use TurboModules and the Fabric render in
37 | # your application. You should enable this flag either if you want
38 | # to write custom TurboModules/Fabric components OR use libraries that
39 | # are providing them.
40 | newArchEnabled=false
41 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84 |
85 | APP_NAME="Gradle"
86 | APP_BASE_NAME=${0##*/}
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | MAX_FD=$( ulimit -H -n ) ||
147 | warn "Could not query maximum file descriptor limit"
148 | esac
149 | case $MAX_FD in #(
150 | '' | soft) :;; #(
151 | *)
152 | ulimit -n "$MAX_FD" ||
153 | warn "Could not set maximum file descriptor limit to $MAX_FD"
154 | esac
155 | fi
156 |
157 | # Collect all arguments for the java command, stacking in reverse order:
158 | # * args from the command line
159 | # * the main class name
160 | # * -classpath
161 | # * -D...appname settings
162 | # * --module-path (only if needed)
163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164 |
165 | # For Cygwin or MSYS, switch paths to Windows format before running java
166 | if "$cygwin" || "$msys" ; then
167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169 |
170 | JAVACMD=$( cygpath --unix "$JAVACMD" )
171 |
172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
173 | for arg do
174 | if
175 | case $arg in #(
176 | -*) false ;; # don't mess with options #(
177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178 | [ -e "$t" ] ;; #(
179 | *) false ;;
180 | esac
181 | then
182 | arg=$( cygpath --path --ignore --mixed "$arg" )
183 | fi
184 | # Roll the args list around exactly as many times as the number of
185 | # args, so each arg winds up back in the position where it started, but
186 | # possibly modified.
187 | #
188 | # NB: a `for` loop captures its iteration list before it begins, so
189 | # changing the positional parameters here affects neither the number of
190 | # iterations, nor the values presented in `arg`.
191 | shift # remove old arg
192 | set -- "$@" "$arg" # push replacement arg
193 | done
194 | fi
195 |
196 | # Collect all arguments for the java command;
197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198 | # shell script including quotes and variable substitutions, so put them in
199 | # double quotes to make sure that they get re-expanded; and
200 | # * put everything else in single quotes, so that it's not re-expanded.
201 |
202 | set -- \
203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
204 | -classpath "$CLASSPATH" \
205 | org.gradle.wrapper.GradleWrapperMain \
206 | "$@"
207 |
208 | # Use "xargs" to parse quoted args.
209 | #
210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211 | #
212 | # In Bash we could simply go:
213 | #
214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215 | # set -- "${ARGS[@]}" "$@"
216 | #
217 | # but POSIX shell has neither arrays nor command substitution, so instead we
218 | # post-process each arg (as a line of input to sed) to backslash-escape any
219 | # character that might be a shell metacharacter, then use eval to reverse
220 | # that process (while maintaining the separation between arguments), and wrap
221 | # the whole thing up as a single "set" statement.
222 | #
223 | # This will of course break if any of these variables contains a newline or
224 | # an unmatched quote.
225 | #
226 |
227 | eval "set -- $(
228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229 | xargs -n1 |
230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231 | tr '\n' ' '
232 | )" '"$@"'
233 |
234 | exec "$JAVACMD" "$@"
235 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/android/link-assets-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "migIndex": 1,
3 | "data": [
4 | {
5 | "path": "src/assets/fonts/Montserrat/Montserrat-Black.ttf",
6 | "sha1": "d6efdc8c120df6af92ad5836c150bcbdac58b44e"
7 | },
8 | {
9 | "path": "src/assets/fonts/Montserrat/Montserrat-BlackItalic.ttf",
10 | "sha1": "5ebf61d6abc52feafe972df8a4c06f120f401fe0"
11 | },
12 | {
13 | "path": "src/assets/fonts/Montserrat/Montserrat-Bold.ttf",
14 | "sha1": "97e2be433a5c4f622112b723d9ea9a23df6338f4"
15 | },
16 | {
17 | "path": "src/assets/fonts/Montserrat/Montserrat-BoldItalic.ttf",
18 | "sha1": "98cfe7692bfc754c2007b3689a8e81e739a06ea1"
19 | },
20 | {
21 | "path": "src/assets/fonts/Montserrat/Montserrat-ExtraBold.ttf",
22 | "sha1": "7ca2cd2eae0ed0c291a02296d7467ce0cad64afc"
23 | },
24 | {
25 | "path": "src/assets/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf",
26 | "sha1": "6c35f02984850f923c8193e46922c957c3c55964"
27 | },
28 | {
29 | "path": "src/assets/fonts/Montserrat/Montserrat-ExtraLight.ttf",
30 | "sha1": "0045e8ed82ec04dcf83f2330ab7cdaa7d5f65b84"
31 | },
32 | {
33 | "path": "src/assets/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf",
34 | "sha1": "f870c8ddb9d780ffb374a2dbf0031cb23121c438"
35 | },
36 | {
37 | "path": "src/assets/fonts/Montserrat/Montserrat-Italic.ttf",
38 | "sha1": "a60d6f00e83110d2bc0d828af0d5f57d137d979f"
39 | },
40 | {
41 | "path": "src/assets/fonts/Montserrat/Montserrat-Light.ttf",
42 | "sha1": "3571554641eb70658156b4f3705057a9cd380c7b"
43 | },
44 | {
45 | "path": "src/assets/fonts/Montserrat/Montserrat-LightItalic.ttf",
46 | "sha1": "805aac14f1b0345f6994206413b29fcebbc1d8d6"
47 | },
48 | {
49 | "path": "src/assets/fonts/Montserrat/Montserrat-Medium.ttf",
50 | "sha1": "6fd70300b7e19aa191a5eb06dc0374c46ca97dcb"
51 | },
52 | {
53 | "path": "src/assets/fonts/Montserrat/Montserrat-MediumItalic.ttf",
54 | "sha1": "87044a5e426a6ebdc6880ea012ebf6f0c1281b09"
55 | },
56 | {
57 | "path": "src/assets/fonts/Montserrat/Montserrat-Regular.ttf",
58 | "sha1": "6b81c92b065c20c37190d983a79fa38cf6e60552"
59 | },
60 | {
61 | "path": "src/assets/fonts/Montserrat/Montserrat-SemiBold.ttf",
62 | "sha1": "201ccee5dcb1e9d38716168f3a56598a6808ed51"
63 | },
64 | {
65 | "path": "src/assets/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf",
66 | "sha1": "464d0c754c76241288c3d792a11f13bde9a927dc"
67 | },
68 | {
69 | "path": "src/assets/fonts/Montserrat/Montserrat-Thin.ttf",
70 | "sha1": "32564a6e35f7ff6c4a66fa493f5174aee3cc3ca6"
71 | },
72 | {
73 | "path": "src/assets/fonts/Montserrat/Montserrat-ThinItalic.ttf",
74 | "sha1": "21fdb007ec60c23df8ef1fbb586b397b2f1f099a"
75 | }
76 | ]
77 | }
78 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'RNTypescriptBoilerplate'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/react-native-gradle-plugin')
5 |
6 | if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
7 | include(":ReactAndroid")
8 | project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
9 | include(":ReactAndroid:hermes-engine")
10 | project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
11 | }
12 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "RNTypescriptBoilerplate",
3 | "displayName": "RNTypescriptBoilerplate"
4 | }
--------------------------------------------------------------------------------
/assets/axios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/assets/axios.png
--------------------------------------------------------------------------------
/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/assets/logo.png
--------------------------------------------------------------------------------
/assets/react-native-typescript-boilerplate.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/assets/react-native-typescript-boilerplate.gif
--------------------------------------------------------------------------------
/assets/redux.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/assets/redux.png
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/docs/axios-hooks.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # 🍾 [Axios Hooks](https://github.com/simoneb/axios-hooks) Usage Example
5 |
6 | ## Features
7 |
8 | - All the [axios](https://github.com/axios/axios) awesomeness you are familiar with
9 | - Zero configuration, but configurable if needed
10 |
11 | ```js
12 | import useAxios from 'axios-hooks';
13 | import { View , Text, TouchableOpacity } from "react-native";
14 |
15 | function App() {
16 | const [{ data, loading, error }, refetch] = useAxios(
17 | 'https://reqres.in/api/users?delay=1'
18 | )
19 |
20 | if (loading) return Loading...
21 | if (error) return Error!
22 |
23 | return (
24 |
25 | refetch
26 | {JSON.stringify(data, null, 2)}
27 |
28 | )
29 | }
30 | ```
31 |
32 | ## Documentation
33 |
34 | ### API
35 |
36 | - [useAxios](#useaxiosurlconfig-options)
37 | - [configure](#configure-cache-axios-defaultoptions-)
38 | - [serializeCache](#serializeCache)
39 | - [loadCache](#loadcachecache)
40 | - [makeUseAxios](#makeuseaxios-cache-axios-defaultoptions-)
41 |
--------------------------------------------------------------------------------
/docs/components.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # 🍾 Components
4 |
5 | ## Styles
6 |
7 | - **TextWrapper** over default Text component
8 | - Colors
9 | - Fonts
10 | - Theme
11 | - Font Size
12 |
13 | ## Imports
14 |
15 | Predefined **`h`** tags are usable with TextWrapper
16 |
17 | ```jsx
18 | import Text from "@shared-components/text-wrapper/Text";
19 |
20 | // ? Advanced Usage Example
21 |
22 | Heading 3 Bold Right Sided Custom Text
23 | ;
24 | ```
25 |
26 | ```jsx
27 | import colors from "@colors";
28 |
29 |
30 | Heading 1 with custom color from theme
31 | ;
32 | ```
33 |
34 | ```jsx
35 | import fonts from "@fonts";
36 |
37 |
38 | Heading 1 with custom font usage
39 | ;
40 | ```
41 |
42 | ```jsx
43 | import fontSize from "@font-size";
44 | ```
45 |
46 | ```jsx
47 | import theme from "@theme";
48 | ```
49 |
50 | if you want to call them all at once
51 |
52 | ```js
53 | import { theme, fonts, colors, spacing, fontSize } from "@shared-styles/index";
54 | ```
55 |
--------------------------------------------------------------------------------
/docs/event-emitter.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # 🎃 Event Emitter Usage
4 |
5 | You can emit and listen the specific events with `EventEmitter.emit` and `EventEmitter.on` methods. For more usages and documentation:
6 | ### [Events Documentation](https://github.com/browserify/events)
7 |
8 | ### Event Emit
9 |
10 | ```jsx
11 | import EventEmitter from "@services/event-emitter";
12 |
13 | // Second parameter can be anything; object, string, boolean, etc...
14 | EventEmitter.emit("MESSAGE_RECEIVED", "Event emitter message, this can be object or anything")
15 | ```
16 |
17 | ### Event Listener
18 |
19 | ```jsx
20 | import EventEmitter from "@services/event-emitter";
21 |
22 | // Second parameter can be anything; object, string, boolean, etc...
23 | EventEmitter.on("MESSAGE_RECEIVED", (message: string) => {
24 | console.log("Event Emitter Data: ", message)
25 | });
26 | ```
27 |
28 |
--------------------------------------------------------------------------------
/docs/project-structure.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # 🍺 Project Structure
4 |
5 | ## File structure
6 |
7 | `index.js` is the entry-point for our file, and is mandatory.
8 | `App.tsx` is the main-point for our application.
9 |
10 | - `/android` - contains native code specific to the Android OS
11 | - `/ios` - native code specific to iOS
12 | - `/docs` - as the name suggests - any docs
13 | - `/src` - contains our JS and style code.
14 | - `/screens` - contains all screens/pages
15 | - `/services` - app-wide services
16 | - `/api` - generic network handling with API constants
17 | - `/event-emitter` - singleton event bus to use it everywhere in the project
18 | - `/models` - generic models should lay here
19 | - `/navigation` - navigation system lay here
20 | - `/shared` - whole app-wide shared
21 | - `/components` - app-wide shared components
22 | - `/constants` - app-wide shared constant variables
23 | - `/localization` - app-wide localization
24 | - `/theme` - app-wide theme which contains `color palette` and `fonts`
25 | - `/utils` - generic util functions
26 | - `index.js` - the starting place for our app
27 | - `App.tsx` - the main place for our app
28 |
29 | ## Project Structure on Flat Design
30 |
31 | ```
32 | ├───android
33 | ├───ios
34 | ├───src
35 | │ ├───screens
36 | │ │ ├───detail
37 | │ │ │ ├───DetailScreen.style.ts
38 | │ │ │ └───DetailScreen.tsx
39 | │ │ ├───home
40 | │ │ │ ├───HomeScreen.style.ts
41 | │ │ │ └───HomeScreen.tsx
42 | │ │ ├───notification
43 | │ │ │ ├───NotificationScreen.style.ts
44 | │ │ │ └───NotificationScreen.tsx
45 | │ │ ├───profile
46 | │ │ │ ├───ProfileScreen.style.ts
47 | │ │ │ └───ProfileScreen.tsx
48 | │ │ └───search
49 | │ │ ├───SearchScreen.style.ts
50 | │ │ └───SearchScreen.tsx
51 | │ ├───services
52 | │ │ ├───api
53 | │ │ │ ├───api.constant.ts
54 | │ │ │ └───index.ts
55 | │ │ ├───event-emitter
56 | │ │ │ └───index.ts
57 | │ │ ├───models
58 | │ │ │ └───index.ts
59 | │ │ └───navigation
60 | │ │ └───index.tsx
61 | │ ├───shared
62 | │ │ ├───components
63 | │ │ │ └───text-wrapper
64 | │ │ ├───constants
65 | │ │ │ └───index.ts
66 | │ │ ├───localization
67 | │ │ │ └───index.ts
68 | │ │ └───theme
69 | │ │ ├───fonts.ts
70 | │ │ └───themes.ts
71 | │ └───utils
72 | │ └───index.ts
73 | ├───.babelrc
74 | ├───.commitlintrc.json
75 | ├───.eslintignore
76 | ├───.eslintrc.js
77 | ├───.gitattributes
78 | ├───.gitignore
79 | ├───.npmignore
80 | ├───.prettierignore
81 | ├───.prettierrc
82 | ├───.watchmanconfig
83 | ├───app.json
84 | ├───App.tsx
85 | ├───global.d.ts
86 | ├───index.js
87 | ├───metro.config.js
88 | ├───package-lock.json
89 | ├───package.json
90 | ├───react-native.config.js
91 | ├───README.md
92 | ├───tsconfig.json
93 | ```
94 |
--------------------------------------------------------------------------------
/docs/redux.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # 🍾 [Redux](https://redux.js.org/) Custom Service Usage
5 |
6 | ## Features
7 |
8 | - Everything already setup for redux usage
9 | - Zero configuration, but configurable if needed
10 | - If you want to change / learn something about the redux configuration please check the [Redux Service](../src/services/redux)
11 | - There is a basic example which is `User`
12 |
13 |
14 | ## Basic Example
15 |
16 | - Create your own redux reducer for each of them: [UserReducers](./src/services/redux/user/UserReducers.ts)
17 | - Write your own redux usage service: [UserService](./src/screens/home/services/userService.ts)
18 | - Set a data to redux via User Service: [User Redux Set Example](./src/screens/home/HomeScreen.tsx)
19 | ```jsx
20 | UserService.setUserData(mockUserData);
21 | ```
22 |
23 | - Fetch a data with `react-redux`'s `useSelector` hook [User Redux Fetch Data](./src/screens/profile/ProfileScreen.tsx)
24 |
25 | ```jsx
26 | const userData = useSelector(
27 | (state: MainState) => state.user.userData as IUser,
28 | );
29 | ```
30 |
31 |
32 | ## Side Note
33 |
34 | Of course, you can change the whole Redux usage structure. This one is just an example 👊
35 |
--------------------------------------------------------------------------------
/global.d.ts:
--------------------------------------------------------------------------------
1 | import { theme } from "./src/shared/theme/themes";
2 |
3 | declare module "@react-navigation/native" {
4 | export type ExtendedTheme = typeof theme;
5 | export function useTheme(): ExtendedTheme;
6 | }
7 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 | # NODE_BINARY variable contains the PATH to the node executable.
6 | #
7 | # Customize the NODE_BINARY variable here.
8 | # For example, to use nvm with brew, add the following line
9 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
10 | export NODE_BINARY=$(command -v node)
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '12.4'
5 | install! 'cocoapods', :deterministic_uuids => false
6 |
7 | production = ENV["PRODUCTION"] == "1"
8 |
9 | target 'RNTypescriptBoilerplate' do
10 | config = use_native_modules!
11 |
12 | # Flags change depending on the env values.
13 | flags = get_default_flags()
14 |
15 | use_react_native!(
16 | :path => config[:reactNativePath],
17 | :production => production,
18 | # to enable hermes on iOS, change `false` to `true` and then install pods
19 | :hermes_enabled => flags[:hermes_enabled],
20 | :fabric_enabled => flags[:fabric_enabled],
21 | :flipper_configuration => FlipperConfiguration.enabled,
22 | # An absolute path to your application root.
23 | :app_path => "#{Pod::Config.instance.installation_root}/.."
24 | )
25 |
26 | target 'RNTypescriptBoilerplateTests' do
27 | inherit! :complete
28 | # Pods for testing
29 | end
30 |
31 | post_install do |installer|
32 | react_native_post_install(installer)
33 | __apply_Xcode_12_5_M1_post_install_workaround(installer)
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost (1.76.0)
3 | - CocoaAsyncSocket (7.6.5)
4 | - DoubleConversion (1.1.6)
5 | - FBLazyVector (0.69.4)
6 | - FBReactNativeSpec (0.69.4):
7 | - RCT-Folly (= 2021.06.28.00-v2)
8 | - RCTRequired (= 0.69.4)
9 | - RCTTypeSafety (= 0.69.4)
10 | - React-Core (= 0.69.4)
11 | - React-jsi (= 0.69.4)
12 | - ReactCommon/turbomodule/core (= 0.69.4)
13 | - Flipper (0.125.0):
14 | - Flipper-Folly (~> 2.6)
15 | - Flipper-RSocket (~> 1.4)
16 | - Flipper-Boost-iOSX (1.76.0.1.11)
17 | - Flipper-DoubleConversion (3.2.0.1)
18 | - Flipper-Fmt (7.1.7)
19 | - Flipper-Folly (2.6.10):
20 | - Flipper-Boost-iOSX
21 | - Flipper-DoubleConversion
22 | - Flipper-Fmt (= 7.1.7)
23 | - Flipper-Glog
24 | - libevent (~> 2.1.12)
25 | - OpenSSL-Universal (= 1.1.1100)
26 | - Flipper-Glog (0.5.0.5)
27 | - Flipper-PeerTalk (0.0.4)
28 | - Flipper-RSocket (1.4.3):
29 | - Flipper-Folly (~> 2.6)
30 | - FlipperKit (0.125.0):
31 | - FlipperKit/Core (= 0.125.0)
32 | - FlipperKit/Core (0.125.0):
33 | - Flipper (~> 0.125.0)
34 | - FlipperKit/CppBridge
35 | - FlipperKit/FBCxxFollyDynamicConvert
36 | - FlipperKit/FBDefines
37 | - FlipperKit/FKPortForwarding
38 | - SocketRocket (~> 0.6.0)
39 | - FlipperKit/CppBridge (0.125.0):
40 | - Flipper (~> 0.125.0)
41 | - FlipperKit/FBCxxFollyDynamicConvert (0.125.0):
42 | - Flipper-Folly (~> 2.6)
43 | - FlipperKit/FBDefines (0.125.0)
44 | - FlipperKit/FKPortForwarding (0.125.0):
45 | - CocoaAsyncSocket (~> 7.6)
46 | - Flipper-PeerTalk (~> 0.0.4)
47 | - FlipperKit/FlipperKitHighlightOverlay (0.125.0)
48 | - FlipperKit/FlipperKitLayoutHelpers (0.125.0):
49 | - FlipperKit/Core
50 | - FlipperKit/FlipperKitHighlightOverlay
51 | - FlipperKit/FlipperKitLayoutTextSearchable
52 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0):
53 | - FlipperKit/Core
54 | - FlipperKit/FlipperKitHighlightOverlay
55 | - FlipperKit/FlipperKitLayoutHelpers
56 | - YogaKit (~> 1.18)
57 | - FlipperKit/FlipperKitLayoutPlugin (0.125.0):
58 | - FlipperKit/Core
59 | - FlipperKit/FlipperKitHighlightOverlay
60 | - FlipperKit/FlipperKitLayoutHelpers
61 | - FlipperKit/FlipperKitLayoutIOSDescriptors
62 | - FlipperKit/FlipperKitLayoutTextSearchable
63 | - YogaKit (~> 1.18)
64 | - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0)
65 | - FlipperKit/FlipperKitNetworkPlugin (0.125.0):
66 | - FlipperKit/Core
67 | - FlipperKit/FlipperKitReactPlugin (0.125.0):
68 | - FlipperKit/Core
69 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0):
70 | - FlipperKit/Core
71 | - FlipperKit/SKIOSNetworkPlugin (0.125.0):
72 | - FlipperKit/Core
73 | - FlipperKit/FlipperKitNetworkPlugin
74 | - fmt (6.2.1)
75 | - glog (0.3.5)
76 | - libevent (2.1.12)
77 | - OpenSSL-Universal (1.1.1100)
78 | - RCT-Folly (2021.06.28.00-v2):
79 | - boost
80 | - DoubleConversion
81 | - fmt (~> 6.2.1)
82 | - glog
83 | - RCT-Folly/Default (= 2021.06.28.00-v2)
84 | - RCT-Folly/Default (2021.06.28.00-v2):
85 | - boost
86 | - DoubleConversion
87 | - fmt (~> 6.2.1)
88 | - glog
89 | - RCTRequired (0.69.4)
90 | - RCTTypeSafety (0.69.4):
91 | - FBLazyVector (= 0.69.4)
92 | - RCTRequired (= 0.69.4)
93 | - React-Core (= 0.69.4)
94 | - React (0.69.4):
95 | - React-Core (= 0.69.4)
96 | - React-Core/DevSupport (= 0.69.4)
97 | - React-Core/RCTWebSocket (= 0.69.4)
98 | - React-RCTActionSheet (= 0.69.4)
99 | - React-RCTAnimation (= 0.69.4)
100 | - React-RCTBlob (= 0.69.4)
101 | - React-RCTImage (= 0.69.4)
102 | - React-RCTLinking (= 0.69.4)
103 | - React-RCTNetwork (= 0.69.4)
104 | - React-RCTSettings (= 0.69.4)
105 | - React-RCTText (= 0.69.4)
106 | - React-RCTVibration (= 0.69.4)
107 | - React-bridging (0.69.4):
108 | - RCT-Folly (= 2021.06.28.00-v2)
109 | - React-jsi (= 0.69.4)
110 | - React-callinvoker (0.69.4)
111 | - React-Codegen (0.69.4):
112 | - FBReactNativeSpec (= 0.69.4)
113 | - RCT-Folly (= 2021.06.28.00-v2)
114 | - RCTRequired (= 0.69.4)
115 | - RCTTypeSafety (= 0.69.4)
116 | - React-Core (= 0.69.4)
117 | - React-jsi (= 0.69.4)
118 | - React-jsiexecutor (= 0.69.4)
119 | - ReactCommon/turbomodule/core (= 0.69.4)
120 | - React-Core (0.69.4):
121 | - glog
122 | - RCT-Folly (= 2021.06.28.00-v2)
123 | - React-Core/Default (= 0.69.4)
124 | - React-cxxreact (= 0.69.4)
125 | - React-jsi (= 0.69.4)
126 | - React-jsiexecutor (= 0.69.4)
127 | - React-perflogger (= 0.69.4)
128 | - Yoga
129 | - React-Core/CoreModulesHeaders (0.69.4):
130 | - glog
131 | - RCT-Folly (= 2021.06.28.00-v2)
132 | - React-Core/Default
133 | - React-cxxreact (= 0.69.4)
134 | - React-jsi (= 0.69.4)
135 | - React-jsiexecutor (= 0.69.4)
136 | - React-perflogger (= 0.69.4)
137 | - Yoga
138 | - React-Core/Default (0.69.4):
139 | - glog
140 | - RCT-Folly (= 2021.06.28.00-v2)
141 | - React-cxxreact (= 0.69.4)
142 | - React-jsi (= 0.69.4)
143 | - React-jsiexecutor (= 0.69.4)
144 | - React-perflogger (= 0.69.4)
145 | - Yoga
146 | - React-Core/DevSupport (0.69.4):
147 | - glog
148 | - RCT-Folly (= 2021.06.28.00-v2)
149 | - React-Core/Default (= 0.69.4)
150 | - React-Core/RCTWebSocket (= 0.69.4)
151 | - React-cxxreact (= 0.69.4)
152 | - React-jsi (= 0.69.4)
153 | - React-jsiexecutor (= 0.69.4)
154 | - React-jsinspector (= 0.69.4)
155 | - React-perflogger (= 0.69.4)
156 | - Yoga
157 | - React-Core/RCTActionSheetHeaders (0.69.4):
158 | - glog
159 | - RCT-Folly (= 2021.06.28.00-v2)
160 | - React-Core/Default
161 | - React-cxxreact (= 0.69.4)
162 | - React-jsi (= 0.69.4)
163 | - React-jsiexecutor (= 0.69.4)
164 | - React-perflogger (= 0.69.4)
165 | - Yoga
166 | - React-Core/RCTAnimationHeaders (0.69.4):
167 | - glog
168 | - RCT-Folly (= 2021.06.28.00-v2)
169 | - React-Core/Default
170 | - React-cxxreact (= 0.69.4)
171 | - React-jsi (= 0.69.4)
172 | - React-jsiexecutor (= 0.69.4)
173 | - React-perflogger (= 0.69.4)
174 | - Yoga
175 | - React-Core/RCTBlobHeaders (0.69.4):
176 | - glog
177 | - RCT-Folly (= 2021.06.28.00-v2)
178 | - React-Core/Default
179 | - React-cxxreact (= 0.69.4)
180 | - React-jsi (= 0.69.4)
181 | - React-jsiexecutor (= 0.69.4)
182 | - React-perflogger (= 0.69.4)
183 | - Yoga
184 | - React-Core/RCTImageHeaders (0.69.4):
185 | - glog
186 | - RCT-Folly (= 2021.06.28.00-v2)
187 | - React-Core/Default
188 | - React-cxxreact (= 0.69.4)
189 | - React-jsi (= 0.69.4)
190 | - React-jsiexecutor (= 0.69.4)
191 | - React-perflogger (= 0.69.4)
192 | - Yoga
193 | - React-Core/RCTLinkingHeaders (0.69.4):
194 | - glog
195 | - RCT-Folly (= 2021.06.28.00-v2)
196 | - React-Core/Default
197 | - React-cxxreact (= 0.69.4)
198 | - React-jsi (= 0.69.4)
199 | - React-jsiexecutor (= 0.69.4)
200 | - React-perflogger (= 0.69.4)
201 | - Yoga
202 | - React-Core/RCTNetworkHeaders (0.69.4):
203 | - glog
204 | - RCT-Folly (= 2021.06.28.00-v2)
205 | - React-Core/Default
206 | - React-cxxreact (= 0.69.4)
207 | - React-jsi (= 0.69.4)
208 | - React-jsiexecutor (= 0.69.4)
209 | - React-perflogger (= 0.69.4)
210 | - Yoga
211 | - React-Core/RCTSettingsHeaders (0.69.4):
212 | - glog
213 | - RCT-Folly (= 2021.06.28.00-v2)
214 | - React-Core/Default
215 | - React-cxxreact (= 0.69.4)
216 | - React-jsi (= 0.69.4)
217 | - React-jsiexecutor (= 0.69.4)
218 | - React-perflogger (= 0.69.4)
219 | - Yoga
220 | - React-Core/RCTTextHeaders (0.69.4):
221 | - glog
222 | - RCT-Folly (= 2021.06.28.00-v2)
223 | - React-Core/Default
224 | - React-cxxreact (= 0.69.4)
225 | - React-jsi (= 0.69.4)
226 | - React-jsiexecutor (= 0.69.4)
227 | - React-perflogger (= 0.69.4)
228 | - Yoga
229 | - React-Core/RCTVibrationHeaders (0.69.4):
230 | - glog
231 | - RCT-Folly (= 2021.06.28.00-v2)
232 | - React-Core/Default
233 | - React-cxxreact (= 0.69.4)
234 | - React-jsi (= 0.69.4)
235 | - React-jsiexecutor (= 0.69.4)
236 | - React-perflogger (= 0.69.4)
237 | - Yoga
238 | - React-Core/RCTWebSocket (0.69.4):
239 | - glog
240 | - RCT-Folly (= 2021.06.28.00-v2)
241 | - React-Core/Default (= 0.69.4)
242 | - React-cxxreact (= 0.69.4)
243 | - React-jsi (= 0.69.4)
244 | - React-jsiexecutor (= 0.69.4)
245 | - React-perflogger (= 0.69.4)
246 | - Yoga
247 | - React-CoreModules (0.69.4):
248 | - RCT-Folly (= 2021.06.28.00-v2)
249 | - RCTTypeSafety (= 0.69.4)
250 | - React-Codegen (= 0.69.4)
251 | - React-Core/CoreModulesHeaders (= 0.69.4)
252 | - React-jsi (= 0.69.4)
253 | - React-RCTImage (= 0.69.4)
254 | - ReactCommon/turbomodule/core (= 0.69.4)
255 | - React-cxxreact (0.69.4):
256 | - boost (= 1.76.0)
257 | - DoubleConversion
258 | - glog
259 | - RCT-Folly (= 2021.06.28.00-v2)
260 | - React-callinvoker (= 0.69.4)
261 | - React-jsi (= 0.69.4)
262 | - React-jsinspector (= 0.69.4)
263 | - React-logger (= 0.69.4)
264 | - React-perflogger (= 0.69.4)
265 | - React-runtimeexecutor (= 0.69.4)
266 | - React-jsi (0.69.4):
267 | - boost (= 1.76.0)
268 | - DoubleConversion
269 | - glog
270 | - RCT-Folly (= 2021.06.28.00-v2)
271 | - React-jsi/Default (= 0.69.4)
272 | - React-jsi/Default (0.69.4):
273 | - boost (= 1.76.0)
274 | - DoubleConversion
275 | - glog
276 | - RCT-Folly (= 2021.06.28.00-v2)
277 | - React-jsiexecutor (0.69.4):
278 | - DoubleConversion
279 | - glog
280 | - RCT-Folly (= 2021.06.28.00-v2)
281 | - React-cxxreact (= 0.69.4)
282 | - React-jsi (= 0.69.4)
283 | - React-perflogger (= 0.69.4)
284 | - React-jsinspector (0.69.4)
285 | - React-logger (0.69.4):
286 | - glog
287 | - react-native-safe-area-context (4.3.1):
288 | - RCT-Folly
289 | - RCTRequired
290 | - RCTTypeSafety
291 | - React
292 | - ReactCommon/turbomodule/core
293 | - react-native-splash-screen (3.3.0):
294 | - React-Core
295 | - React-perflogger (0.69.4)
296 | - React-RCTActionSheet (0.69.4):
297 | - React-Core/RCTActionSheetHeaders (= 0.69.4)
298 | - React-RCTAnimation (0.69.4):
299 | - RCT-Folly (= 2021.06.28.00-v2)
300 | - RCTTypeSafety (= 0.69.4)
301 | - React-Codegen (= 0.69.4)
302 | - React-Core/RCTAnimationHeaders (= 0.69.4)
303 | - React-jsi (= 0.69.4)
304 | - ReactCommon/turbomodule/core (= 0.69.4)
305 | - React-RCTBlob (0.69.4):
306 | - RCT-Folly (= 2021.06.28.00-v2)
307 | - React-Codegen (= 0.69.4)
308 | - React-Core/RCTBlobHeaders (= 0.69.4)
309 | - React-Core/RCTWebSocket (= 0.69.4)
310 | - React-jsi (= 0.69.4)
311 | - React-RCTNetwork (= 0.69.4)
312 | - ReactCommon/turbomodule/core (= 0.69.4)
313 | - React-RCTImage (0.69.4):
314 | - RCT-Folly (= 2021.06.28.00-v2)
315 | - RCTTypeSafety (= 0.69.4)
316 | - React-Codegen (= 0.69.4)
317 | - React-Core/RCTImageHeaders (= 0.69.4)
318 | - React-jsi (= 0.69.4)
319 | - React-RCTNetwork (= 0.69.4)
320 | - ReactCommon/turbomodule/core (= 0.69.4)
321 | - React-RCTLinking (0.69.4):
322 | - React-Codegen (= 0.69.4)
323 | - React-Core/RCTLinkingHeaders (= 0.69.4)
324 | - React-jsi (= 0.69.4)
325 | - ReactCommon/turbomodule/core (= 0.69.4)
326 | - React-RCTNetwork (0.69.4):
327 | - RCT-Folly (= 2021.06.28.00-v2)
328 | - RCTTypeSafety (= 0.69.4)
329 | - React-Codegen (= 0.69.4)
330 | - React-Core/RCTNetworkHeaders (= 0.69.4)
331 | - React-jsi (= 0.69.4)
332 | - ReactCommon/turbomodule/core (= 0.69.4)
333 | - React-RCTSettings (0.69.4):
334 | - RCT-Folly (= 2021.06.28.00-v2)
335 | - RCTTypeSafety (= 0.69.4)
336 | - React-Codegen (= 0.69.4)
337 | - React-Core/RCTSettingsHeaders (= 0.69.4)
338 | - React-jsi (= 0.69.4)
339 | - ReactCommon/turbomodule/core (= 0.69.4)
340 | - React-RCTText (0.69.4):
341 | - React-Core/RCTTextHeaders (= 0.69.4)
342 | - React-RCTVibration (0.69.4):
343 | - RCT-Folly (= 2021.06.28.00-v2)
344 | - React-Codegen (= 0.69.4)
345 | - React-Core/RCTVibrationHeaders (= 0.69.4)
346 | - React-jsi (= 0.69.4)
347 | - ReactCommon/turbomodule/core (= 0.69.4)
348 | - React-runtimeexecutor (0.69.4):
349 | - React-jsi (= 0.69.4)
350 | - ReactCommon/turbomodule/core (0.69.4):
351 | - DoubleConversion
352 | - glog
353 | - RCT-Folly (= 2021.06.28.00-v2)
354 | - React-bridging (= 0.69.4)
355 | - React-callinvoker (= 0.69.4)
356 | - React-Core (= 0.69.4)
357 | - React-cxxreact (= 0.69.4)
358 | - React-jsi (= 0.69.4)
359 | - React-logger (= 0.69.4)
360 | - React-perflogger (= 0.69.4)
361 | - ReactNativeLocalization (2.3.1):
362 | - React-Core
363 | - RNCAsyncStorage (1.17.9):
364 | - React-Core
365 | - RNCMaskedView (0.1.11):
366 | - React
367 | - RNGestureHandler (2.5.0):
368 | - React-Core
369 | - RNReanimated (2.9.1):
370 | - DoubleConversion
371 | - FBLazyVector
372 | - FBReactNativeSpec
373 | - glog
374 | - RCT-Folly
375 | - RCTRequired
376 | - RCTTypeSafety
377 | - React-callinvoker
378 | - React-Core
379 | - React-Core/DevSupport
380 | - React-Core/RCTWebSocket
381 | - React-CoreModules
382 | - React-cxxreact
383 | - React-jsi
384 | - React-jsiexecutor
385 | - React-jsinspector
386 | - React-RCTActionSheet
387 | - React-RCTAnimation
388 | - React-RCTBlob
389 | - React-RCTImage
390 | - React-RCTLinking
391 | - React-RCTNetwork
392 | - React-RCTSettings
393 | - React-RCTText
394 | - ReactCommon/turbomodule/core
395 | - Yoga
396 | - RNScreens (3.15.0):
397 | - React-Core
398 | - React-RCTImage
399 | - RNVectorIcons (9.2.0):
400 | - React-Core
401 | - SocketRocket (0.6.0)
402 | - Yoga (1.14.0)
403 | - YogaKit (1.18.1):
404 | - Yoga (~> 1.14)
405 |
406 | DEPENDENCIES:
407 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
408 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
409 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
410 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
411 | - Flipper (= 0.125.0)
412 | - Flipper-Boost-iOSX (= 1.76.0.1.11)
413 | - Flipper-DoubleConversion (= 3.2.0.1)
414 | - Flipper-Fmt (= 7.1.7)
415 | - Flipper-Folly (= 2.6.10)
416 | - Flipper-Glog (= 0.5.0.5)
417 | - Flipper-PeerTalk (= 0.0.4)
418 | - Flipper-RSocket (= 1.4.3)
419 | - FlipperKit (= 0.125.0)
420 | - FlipperKit/Core (= 0.125.0)
421 | - FlipperKit/CppBridge (= 0.125.0)
422 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0)
423 | - FlipperKit/FBDefines (= 0.125.0)
424 | - FlipperKit/FKPortForwarding (= 0.125.0)
425 | - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0)
426 | - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0)
427 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0)
428 | - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0)
429 | - FlipperKit/FlipperKitReactPlugin (= 0.125.0)
430 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0)
431 | - FlipperKit/SKIOSNetworkPlugin (= 0.125.0)
432 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
433 | - OpenSSL-Universal (= 1.1.1100)
434 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
435 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
436 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
437 | - React (from `../node_modules/react-native/`)
438 | - React-bridging (from `../node_modules/react-native/ReactCommon`)
439 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
440 | - React-Codegen (from `build/generated/ios`)
441 | - React-Core (from `../node_modules/react-native/`)
442 | - React-Core/DevSupport (from `../node_modules/react-native/`)
443 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
444 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
445 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
446 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
447 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
448 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
449 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`)
450 | - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
451 | - react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
452 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
453 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
454 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
455 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
456 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
457 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
458 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
459 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
460 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
461 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
462 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
463 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
464 | - ReactNativeLocalization (from `../node_modules/react-native-localization`)
465 | - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
466 | - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
467 | - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
468 | - RNReanimated (from `../node_modules/react-native-reanimated`)
469 | - RNScreens (from `../node_modules/react-native-screens`)
470 | - RNVectorIcons (from `../node_modules/react-native-vector-icons`)
471 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
472 |
473 | SPEC REPOS:
474 | trunk:
475 | - CocoaAsyncSocket
476 | - Flipper
477 | - Flipper-Boost-iOSX
478 | - Flipper-DoubleConversion
479 | - Flipper-Fmt
480 | - Flipper-Folly
481 | - Flipper-Glog
482 | - Flipper-PeerTalk
483 | - Flipper-RSocket
484 | - FlipperKit
485 | - fmt
486 | - libevent
487 | - OpenSSL-Universal
488 | - SocketRocket
489 | - YogaKit
490 |
491 | EXTERNAL SOURCES:
492 | boost:
493 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
494 | DoubleConversion:
495 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
496 | FBLazyVector:
497 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
498 | FBReactNativeSpec:
499 | :path: "../node_modules/react-native/React/FBReactNativeSpec"
500 | glog:
501 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
502 | RCT-Folly:
503 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
504 | RCTRequired:
505 | :path: "../node_modules/react-native/Libraries/RCTRequired"
506 | RCTTypeSafety:
507 | :path: "../node_modules/react-native/Libraries/TypeSafety"
508 | React:
509 | :path: "../node_modules/react-native/"
510 | React-bridging:
511 | :path: "../node_modules/react-native/ReactCommon"
512 | React-callinvoker:
513 | :path: "../node_modules/react-native/ReactCommon/callinvoker"
514 | React-Codegen:
515 | :path: build/generated/ios
516 | React-Core:
517 | :path: "../node_modules/react-native/"
518 | React-CoreModules:
519 | :path: "../node_modules/react-native/React/CoreModules"
520 | React-cxxreact:
521 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
522 | React-jsi:
523 | :path: "../node_modules/react-native/ReactCommon/jsi"
524 | React-jsiexecutor:
525 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
526 | React-jsinspector:
527 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
528 | React-logger:
529 | :path: "../node_modules/react-native/ReactCommon/logger"
530 | react-native-safe-area-context:
531 | :path: "../node_modules/react-native-safe-area-context"
532 | react-native-splash-screen:
533 | :path: "../node_modules/react-native-splash-screen"
534 | React-perflogger:
535 | :path: "../node_modules/react-native/ReactCommon/reactperflogger"
536 | React-RCTActionSheet:
537 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
538 | React-RCTAnimation:
539 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
540 | React-RCTBlob:
541 | :path: "../node_modules/react-native/Libraries/Blob"
542 | React-RCTImage:
543 | :path: "../node_modules/react-native/Libraries/Image"
544 | React-RCTLinking:
545 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
546 | React-RCTNetwork:
547 | :path: "../node_modules/react-native/Libraries/Network"
548 | React-RCTSettings:
549 | :path: "../node_modules/react-native/Libraries/Settings"
550 | React-RCTText:
551 | :path: "../node_modules/react-native/Libraries/Text"
552 | React-RCTVibration:
553 | :path: "../node_modules/react-native/Libraries/Vibration"
554 | React-runtimeexecutor:
555 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
556 | ReactCommon:
557 | :path: "../node_modules/react-native/ReactCommon"
558 | ReactNativeLocalization:
559 | :path: "../node_modules/react-native-localization"
560 | RNCAsyncStorage:
561 | :path: "../node_modules/@react-native-async-storage/async-storage"
562 | RNCMaskedView:
563 | :path: "../node_modules/@react-native-community/masked-view"
564 | RNGestureHandler:
565 | :path: "../node_modules/react-native-gesture-handler"
566 | RNReanimated:
567 | :path: "../node_modules/react-native-reanimated"
568 | RNScreens:
569 | :path: "../node_modules/react-native-screens"
570 | RNVectorIcons:
571 | :path: "../node_modules/react-native-vector-icons"
572 | Yoga:
573 | :path: "../node_modules/react-native/ReactCommon/yoga"
574 |
575 | SPEC CHECKSUMS:
576 | boost: a7c83b31436843459a1961bfd74b96033dc77234
577 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
578 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
579 | FBLazyVector: c71b8c429a8af2aff1013934a7152e9d9d0c937d
580 | FBReactNativeSpec: cb0df4f0084281b394f76bb9b4d1d9540f35963f
581 | Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
582 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
583 | Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
584 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
585 | Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
586 | Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
587 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
588 | Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
589 | FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
590 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
591 | glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a
592 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
593 | OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
594 | RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a
595 | RCTRequired: bd9d2ab0fda10171fcbcf9ba61a7df4dc15a28f4
596 | RCTTypeSafety: e44e139bf6ec8042db396201834fc2372f6a21cd
597 | React: 482cd1ba23c471be1aed3800180be2427418d7be
598 | React-bridging: c2ea4fed6fe4ed27c12fd71e88b5d5d3da107fde
599 | React-callinvoker: d4d1f98163fb5e35545e910415ef6c04796bb188
600 | React-Codegen: ff35fb9c7f6ec2ed34fb6de2e1099d88dfb25f2f
601 | React-Core: 4d3443a45b67c71d74d7243ddde9569d1e4f4fad
602 | React-CoreModules: 70be25399366b5632ab18ecf6fe444a8165a7bea
603 | React-cxxreact: 822d3794fc0bf206f4691592f90e086dd4f92228
604 | React-jsi: ffa51cbc9a78cc156cf61f79ed52ecb76dc6013b
605 | React-jsiexecutor: a27badbbdbc0ff781813370736a2d1c7261181d4
606 | React-jsinspector: 8a3d3f5dcd23a91e8c80b1bf0e96902cd1dca999
607 | React-logger: 1088859f145b8f6dd0d3ed051a647ef0e3e80fad
608 | react-native-safe-area-context: 6c12e3859b6f27b25de4fee8201cfb858432d8de
609 | react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
610 | React-perflogger: cb386fd44c97ec7f8199c04c12b22066b0f2e1e0
611 | React-RCTActionSheet: f803a85e46cf5b4066c2ac5e122447f918e9c6e5
612 | React-RCTAnimation: 19c80fa950ccce7f4db76a2a7f2cf79baae07fc7
613 | React-RCTBlob: f36ab97e2d515c36df14a1571e50056be80413d5
614 | React-RCTImage: 2c8f0a329a116248e82f8972ffe806e47c6d1cfa
615 | React-RCTLinking: 670f0223075aff33be3b89714f1da4f5343fc4af
616 | React-RCTNetwork: 09385b73f4ff1f46bd5d749540fb33f69a7e5908
617 | React-RCTSettings: 33b12d3ac7a1f2eba069ec7bd1b84345263b3bbe
618 | React-RCTText: a1a3ea902403bd9ae4cf6f7960551dc1d25711b5
619 | React-RCTVibration: 9adb4a3cbb598d1bbd46a05256f445e4b8c70603
620 | React-runtimeexecutor: 61ee22a8cdf8b6bb2a7fb7b4ba2cc763e5285196
621 | ReactCommon: 8f67bd7e0a6afade0f20718f859dc8c2275f2e83
622 | ReactNativeLocalization: 076497d7ca70341c751cd3b3e7c86187332a182d
623 | RNCAsyncStorage: b2489b49e38c85e10ed45a888d13a2a4c7b32ea1
624 | RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
625 | RNGestureHandler: bad495418bcbd3ab47017a38d93d290ebd406f50
626 | RNReanimated: 2cf7451318bb9cc430abeec8d67693f9cf4e039c
627 | RNScreens: 4a1af06327774490d97342c00aee0c2bafb497b7
628 | RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8
629 | SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
630 | Yoga: ff994563b2fd98c982ca58e8cd9db2cdaf4dda74
631 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
632 |
633 | PODFILE CHECKSUM: 841ee88db4205ddd86debcdb4b5b62309f00bcaf
634 |
635 | COCOAPODS: 1.11.3
636 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate.xcodeproj/xcshareddata/xcschemes/RNTypescriptBoilerplate.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : UIResponder
5 |
6 | @property (nonatomic, strong) UIWindow *window;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 | #import
5 | #import
6 | #import
7 | #import "RNSplashScreen.h"
8 |
9 | #if RCT_NEW_ARCH_ENABLED
10 | #import
11 | #import
12 | #import
13 | #import
14 | #import
15 | #import
16 |
17 | #import
18 |
19 | static NSString *const kRNConcurrentRoot = @"concurrentRoot";
20 |
21 | @interface AppDelegate () {
22 | RCTTurboModuleManager *_turboModuleManager;
23 | RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
24 | std::shared_ptr _reactNativeConfig;
25 | facebook::react::ContextContainer::Shared _contextContainer;
26 | }
27 | @end
28 | #endif
29 |
30 | @implementation AppDelegate
31 |
32 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
33 | {
34 | RCTAppSetupPrepareApp(application);
35 |
36 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
37 |
38 | #if RCT_NEW_ARCH_ENABLED
39 | _contextContainer = std::make_shared();
40 | _reactNativeConfig = std::make_shared();
41 | _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
42 | _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
43 | bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
44 | #endif
45 |
46 | NSDictionary *initProps = [self prepareInitialProps];
47 | UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"RNTypescriptBoilerplate", initProps);
48 |
49 | if (@available(iOS 13.0, *)) {
50 | rootView.backgroundColor = [UIColor systemBackgroundColor];
51 | } else {
52 | rootView.backgroundColor = [UIColor whiteColor];
53 | }
54 |
55 | // SplashScreen Initialization
56 | [RNSplashScreen show];
57 |
58 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
59 | UIViewController *rootViewController = [UIViewController new];
60 | rootViewController.view = rootView;
61 | self.window.rootViewController = rootViewController;
62 | [self.window makeKeyAndVisible];
63 | return YES;
64 | }
65 |
66 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
67 | ///
68 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
69 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
70 | /// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
71 | - (BOOL)concurrentRootEnabled
72 | {
73 | // Switch this bool to turn on and off the concurrent root
74 | return true;
75 | }
76 | - (NSDictionary *)prepareInitialProps
77 | {
78 | NSMutableDictionary *initProps = [NSMutableDictionary new];
79 | #ifdef RCT_NEW_ARCH_ENABLED
80 | initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
81 | #endif
82 | return initProps;
83 | }
84 |
85 |
86 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
87 | {
88 | #if DEBUG
89 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
90 | #else
91 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
92 | #endif
93 | }
94 |
95 | #if RCT_NEW_ARCH_ENABLED
96 |
97 | #pragma mark - RCTCxxBridgeDelegate
98 |
99 | - (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge
100 | {
101 | _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
102 | delegate:self
103 | jsInvoker:bridge.jsCallInvoker];
104 | return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
105 | }
106 |
107 | #pragma mark RCTTurboModuleManagerDelegate
108 |
109 | - (Class)getModuleClassFromName:(const char *)name
110 | {
111 | return RCTCoreModulesClassProvider(name);
112 | }
113 |
114 | - (std::shared_ptr)getTurboModule:(const std::string &)name
115 | jsInvoker:(std::shared_ptr)jsInvoker
116 | {
117 | return nullptr;
118 | }
119 |
120 | - (std::shared_ptr)getTurboModule:(const std::string &)name
121 | initParams:
122 | (const facebook::react::ObjCTurboModule::InitParams &)params
123 | {
124 | return nullptr;
125 | }
126 |
127 | - (id)getModuleInstanceFromClass:(Class)moduleClass
128 | {
129 | return RCTAppSetupDefaultModuleFromClass(moduleClass);
130 | }
131 |
132 | #endif
133 |
134 | @end
135 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/Images.xcassets/LaunchScreen.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "shifaaz-shamoon-unsplash.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "filename" : "shifaaz-shamoon-unsplash@2x.jpg",
10 | "idiom" : "universal",
11 | "scale" : "2x"
12 | },
13 | {
14 | "filename" : "shifaaz-shamoon-unsplash@3x.jpg",
15 | "idiom" : "universal",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "author" : "xcode",
21 | "version" : 1
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/Images.xcassets/LaunchScreen.imageset/shifaaz-shamoon-unsplash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/ios/RNTypescriptBoilerplate/Images.xcassets/LaunchScreen.imageset/shifaaz-shamoon-unsplash.jpg
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/Images.xcassets/LaunchScreen.imageset/shifaaz-shamoon-unsplash@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/ios/RNTypescriptBoilerplate/Images.xcassets/LaunchScreen.imageset/shifaaz-shamoon-unsplash@2x.jpg
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/Images.xcassets/LaunchScreen.imageset/shifaaz-shamoon-unsplash@3x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/ios/RNTypescriptBoilerplate/Images.xcassets/LaunchScreen.imageset/shifaaz-shamoon-unsplash@3x.jpg
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | RNTypescriptBoilerplate
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSExceptionDomains
30 |
31 | localhost
32 |
33 | NSExceptionAllowsInsecureHTTPLoads
34 |
35 |
36 |
37 |
38 | NSLocationWhenInUseUsageDescription
39 |
40 | UILaunchStoryboardName
41 | LaunchScreen
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 | UIViewControllerBasedStatusBarAppearance
53 |
54 | UIAppFonts
55 |
56 | AntDesign.ttf
57 | Entypo.ttf
58 | EvilIcons.ttf
59 | Feather.ttf
60 | FontAwesome.ttf
61 | FontAwesome5_Brands.ttf
62 | FontAwesome5_Regular.ttf
63 | FontAwesome5_Solid.ttf
64 | Foundation.ttf
65 | Ionicons.ttf
66 | MaterialIcons.ttf
67 | MaterialCommunityIcons.ttf
68 | SimpleLineIcons.ttf
69 | Octicons.ttf
70 | Zocial.ttf
71 | Fontisto.ttf
72 | Montserrat-Black.ttf
73 | Montserrat-BlackItalic.ttf
74 | Montserrat-Bold.ttf
75 | Montserrat-BoldItalic.ttf
76 | Montserrat-ExtraBold.ttf
77 | Montserrat-ExtraBoldItalic.ttf
78 | Montserrat-ExtraLight.ttf
79 | Montserrat-ExtraLightItalic.ttf
80 | Montserrat-Italic.ttf
81 | Montserrat-Light.ttf
82 | Montserrat-LightItalic.ttf
83 | Montserrat-Medium.ttf
84 | Montserrat-MediumItalic.ttf
85 | Montserrat-Regular.ttf
86 | Montserrat-SemiBold.ttf
87 | Montserrat-SemiBoldItalic.ttf
88 | Montserrat-Thin.ttf
89 | Montserrat-ThinItalic.ttf
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplate/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplateTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/RNTypescriptBoilerplateTests/RNTypescriptBoilerplateTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface RNTypescriptBoilerplateTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation RNTypescriptBoilerplateTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/ios/link-assets-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "migIndex": 1,
3 | "data": [
4 | {
5 | "path": "src/assets/fonts/Montserrat/Montserrat-Black.ttf",
6 | "sha1": "d6efdc8c120df6af92ad5836c150bcbdac58b44e"
7 | },
8 | {
9 | "path": "src/assets/fonts/Montserrat/Montserrat-BlackItalic.ttf",
10 | "sha1": "5ebf61d6abc52feafe972df8a4c06f120f401fe0"
11 | },
12 | {
13 | "path": "src/assets/fonts/Montserrat/Montserrat-Bold.ttf",
14 | "sha1": "97e2be433a5c4f622112b723d9ea9a23df6338f4"
15 | },
16 | {
17 | "path": "src/assets/fonts/Montserrat/Montserrat-BoldItalic.ttf",
18 | "sha1": "98cfe7692bfc754c2007b3689a8e81e739a06ea1"
19 | },
20 | {
21 | "path": "src/assets/fonts/Montserrat/Montserrat-ExtraBold.ttf",
22 | "sha1": "7ca2cd2eae0ed0c291a02296d7467ce0cad64afc"
23 | },
24 | {
25 | "path": "src/assets/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf",
26 | "sha1": "6c35f02984850f923c8193e46922c957c3c55964"
27 | },
28 | {
29 | "path": "src/assets/fonts/Montserrat/Montserrat-ExtraLight.ttf",
30 | "sha1": "0045e8ed82ec04dcf83f2330ab7cdaa7d5f65b84"
31 | },
32 | {
33 | "path": "src/assets/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf",
34 | "sha1": "f870c8ddb9d780ffb374a2dbf0031cb23121c438"
35 | },
36 | {
37 | "path": "src/assets/fonts/Montserrat/Montserrat-Italic.ttf",
38 | "sha1": "a60d6f00e83110d2bc0d828af0d5f57d137d979f"
39 | },
40 | {
41 | "path": "src/assets/fonts/Montserrat/Montserrat-Light.ttf",
42 | "sha1": "3571554641eb70658156b4f3705057a9cd380c7b"
43 | },
44 | {
45 | "path": "src/assets/fonts/Montserrat/Montserrat-LightItalic.ttf",
46 | "sha1": "805aac14f1b0345f6994206413b29fcebbc1d8d6"
47 | },
48 | {
49 | "path": "src/assets/fonts/Montserrat/Montserrat-Medium.ttf",
50 | "sha1": "6fd70300b7e19aa191a5eb06dc0374c46ca97dcb"
51 | },
52 | {
53 | "path": "src/assets/fonts/Montserrat/Montserrat-MediumItalic.ttf",
54 | "sha1": "87044a5e426a6ebdc6880ea012ebf6f0c1281b09"
55 | },
56 | {
57 | "path": "src/assets/fonts/Montserrat/Montserrat-Regular.ttf",
58 | "sha1": "6b81c92b065c20c37190d983a79fa38cf6e60552"
59 | },
60 | {
61 | "path": "src/assets/fonts/Montserrat/Montserrat-SemiBold.ttf",
62 | "sha1": "201ccee5dcb1e9d38716168f3a56598a6808ed51"
63 | },
64 | {
65 | "path": "src/assets/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf",
66 | "sha1": "464d0c754c76241288c3d792a11f13bde9a927dc"
67 | },
68 | {
69 | "path": "src/assets/fonts/Montserrat/Montserrat-Thin.ttf",
70 | "sha1": "32564a6e35f7ff6c4a66fa493f5174aee3cc3ca6"
71 | },
72 | {
73 | "path": "src/assets/fonts/Montserrat/Montserrat-ThinItalic.ttf",
74 | "sha1": "21fdb007ec60c23df8ef1fbb586b397b2f1f099a"
75 | }
76 | ]
77 | }
78 |
--------------------------------------------------------------------------------
/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: true,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-typescript-redux-boilerplate",
3 | "version": "3.4.0",
4 | "description": "React Native Template/Boilerplate for awesome applications, using Typescript with a lot of built-in ready features.",
5 | "dependencies": {
6 | "@freakycoder/react-native-bounceable": "^1.0.3",
7 | "@freakycoder/react-native-custom-text": "0.1.2",
8 | "@freakycoder/react-native-helpers": "^1.0.2",
9 | "@react-native-async-storage/async-storage": "^1.17.9",
10 | "@react-native-community/masked-view": "^0.1.11",
11 | "@react-navigation/bottom-tabs": "^6.3.2",
12 | "@react-navigation/native": "^6.0.11",
13 | "@react-navigation/stack": "^6.2.2",
14 | "@reduxjs/toolkit": "^1.8.4",
15 | "axios": "^0.27.2",
16 | "axios-hooks": "^3.1.4",
17 | "events": "^3.3.0",
18 | "react": "18.2.0",
19 | "react-native": "0.69.4",
20 | "react-native-dynamic-vector-icons": "^1.2.0",
21 | "react-native-gesture-handler": "^2.5.0",
22 | "react-native-localization": "^2.3.1",
23 | "react-native-reanimated": "^2.9.1",
24 | "react-native-safe-area-context": "^4.3.1",
25 | "react-native-screens": "^3.15.0",
26 | "react-native-splash-screen": "^3.3.0",
27 | "react-native-vector-icons": "^9.2.0",
28 | "react-navigation-helpers": "^2.1.0",
29 | "react-redux": "^8.0.2",
30 | "redux": "^4.2.0",
31 | "redux-flipper": "^2.0.2",
32 | "redux-persist": "^6.0.0",
33 | "redux-saga": "^1.2.0"
34 | },
35 | "devDependencies": {
36 | "@babel/core": "^7.18.10",
37 | "@babel/runtime": "^7.18.9",
38 | "@commitlint/cli": "^17.0.3",
39 | "@commitlint/config-conventional": "^17.0.3",
40 | "@types/react-native": "^0.69.5",
41 | "@typescript-eslint/eslint-plugin": "^5.33.0",
42 | "@typescript-eslint/parser": "^5.33.0",
43 | "babel-plugin-module-resolver": "^4.1.0",
44 | "eslint": "^8.22.0",
45 | "eslint-config-prettier": "8.5.0",
46 | "eslint-config-standard-react-native": "1.0.0",
47 | "eslint-plugin-flowtype": "^8.0.3",
48 | "eslint-plugin-import": "2.26.0",
49 | "eslint-plugin-jest": "26.8.3",
50 | "eslint-plugin-jsx-a11y": "6.6.1",
51 | "eslint-plugin-prettier": "4.2.1",
52 | "eslint-plugin-promise": "6.0.0",
53 | "eslint-plugin-react": "7.30.1",
54 | "eslint-plugin-react-hooks": "4.6.0",
55 | "eslint-plugin-react-native": "4.0.0",
56 | "eslint-plugin-unused-imports": "^2.0.0",
57 | "husky": "^8.0.1",
58 | "metro-react-native-babel-preset": "^0.72.0",
59 | "prettier": "^2.7.1",
60 | "react-test-renderer": "18.2.0",
61 | "typescript": "^4.7.4"
62 | },
63 | "scripts": {
64 | "android": "npx react-native run-android",
65 | "ios": "npx react-native run-ios",
66 | "start": "react-native start --reset-cache",
67 | "husky:setup": "npx husky-init && npm run husky:commitlint && npm run husky:prettier && npm run husky:lint",
68 | "husky:commitlint": "npx husky add .husky/commit-msg 'npx --no-install commitlint --edit'",
69 | "husky:prettier": "npx husky set .husky/pre-commit 'npm run prettier'",
70 | "husky:lint": "npx husky add .husky/pre-commit 'npm run lint'",
71 | "clean-up": "rm -rf .git && rm -rf ./assets && git init && npm run husky:setup",
72 | "clean:android": "cd android && ./gradlew clean",
73 | "debug:android": "cd android && ./gradlew assembleDebug",
74 | "release:android": "cd android && ./gradlew assembleRelease",
75 | "release:play": "cd android && ./gradlew bundleRelease",
76 | "test:apk": "react-native run-android --variant=release",
77 | "prettier": "cd src && npx prettier --write . && git add .",
78 | "prepare": "husky install",
79 | "test": "jest",
80 | "lint": "eslint . --ext .js,.jsx,.ts,.tsx"
81 | },
82 | "engine": {
83 | "node": ">=16.10.0",
84 | "npm": ">=7.24.0"
85 | },
86 | "resolutions": {
87 | "@types/react": "^17"
88 | },
89 | "jest": {
90 | "preset": "react-native",
91 | "moduleFileExtensions": [
92 | "ts",
93 | "tsx",
94 | "js",
95 | "jsx",
96 | "json",
97 | "node"
98 | ]
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/react-native.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | assets: ["./src/assets/fonts"],
3 | };
4 |
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-Black.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-BlackItalic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-Bold.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-BoldItalic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-ExtraBold.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-ExtraLight.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-Italic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-Light.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-LightItalic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-MediumItalic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-SemiBold.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-Thin.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Montserrat/Montserrat-ThinItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/fonts/Montserrat/Montserrat-ThinItalic.ttf
--------------------------------------------------------------------------------
/src/assets/splash/shifaaz-shamoon-unsplash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WrathChaos/react-native-typescript-redux-boilerplate/f9f815c5acdaa1d0f670438e8e7e7ed0d6d39808/src/assets/splash/shifaaz-shamoon-unsplash.jpg
--------------------------------------------------------------------------------
/src/navigation/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { useColorScheme } from "react-native";
3 | import Icon from "react-native-dynamic-vector-icons";
4 | import { createStackNavigator } from "@react-navigation/stack";
5 | import { NavigationContainer } from "@react-navigation/native";
6 | import { isReadyRef, navigationRef } from "react-navigation-helpers";
7 | import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
8 | /**
9 | * ? Local & Shared Imports
10 | */
11 | import { SCREENS } from "@shared-constants";
12 | import { LightTheme, DarkTheme, palette } from "@theme/themes";
13 | // ? Screens
14 | import HomeScreen from "@screens/home/HomeScreen";
15 | import SearchScreen from "@screens/search/SearchScreen";
16 | import DetailScreen from "@screens/detail/DetailScreen";
17 | import ProfileScreen from "@screens/profile/ProfileScreen";
18 | import NotificationScreen from "@screens/notification/NotificationScreen";
19 |
20 | // ? If you want to use stack or tab or both
21 | const Tab = createBottomTabNavigator();
22 | const Stack = createStackNavigator();
23 |
24 | const Navigation = () => {
25 | const scheme = useColorScheme();
26 | const isDarkMode = scheme === "dark";
27 |
28 | React.useEffect((): any => {
29 | return () => (isReadyRef.current = false);
30 | }, []);
31 |
32 | const renderTabIcon = (
33 | route: any,
34 | focused: boolean,
35 | color: string,
36 | size: number,
37 | ) => {
38 | let iconName = "home";
39 | switch (route.name) {
40 | case SCREENS.HOME:
41 | iconName = focused ? "home" : "home-outline";
42 | break;
43 | case SCREENS.SEARCH:
44 | iconName = focused ? "search" : "search-outline";
45 | break;
46 | case SCREENS.NOTIFICATION:
47 | iconName = focused ? "notifications" : "notifications-outline";
48 | break;
49 | case SCREENS.PROFILE:
50 | iconName = focused ? "person" : "person-outline";
51 | break;
52 | default:
53 | iconName = focused ? "home" : "home-outline";
54 | break;
55 | }
56 | return ;
57 | };
58 |
59 | const renderTabNavigation = () => {
60 | return (
61 | ({
63 | headerShown: false,
64 | tabBarIcon: ({ focused, color, size }) =>
65 | renderTabIcon(route, focused, color, size),
66 | tabBarActiveTintColor: palette.primary,
67 | tabBarInactiveTintColor: "gray",
68 | tabBarStyle: {
69 | backgroundColor: isDarkMode ? palette.black : palette.white,
70 | },
71 | })}
72 | >
73 |
74 |
75 |
79 |
80 |
81 | );
82 | };
83 |
84 | return (
85 | {
88 | isReadyRef.current = true;
89 | }}
90 | theme={isDarkMode ? DarkTheme : LightTheme}
91 | >
92 |
93 |
94 |
95 | {(props) => }
96 |
97 |
98 |
99 | );
100 | };
101 |
102 | export default Navigation;
103 |
--------------------------------------------------------------------------------
/src/screens/detail/DetailScreen.style.ts:
--------------------------------------------------------------------------------
1 | import { ExtendedTheme } from "@react-navigation/native";
2 | import { ViewStyle, StyleSheet, TextStyle } from "react-native";
3 |
4 | interface Style {
5 | container: ViewStyle;
6 | titleTextStyle: TextStyle;
7 | buttonStyle: ViewStyle;
8 | buttonTextStyle: TextStyle;
9 | }
10 |
11 | export default (theme: ExtendedTheme) => {
12 | const { colors } = theme;
13 | return StyleSheet.create