diff --git a/examples/v0.71.19/.eslintrc.js b/examples/v0.71.19/.eslintrc.js new file mode 100644 index 00000000..40c6dcd0 --- /dev/null +++ b/examples/v0.71.19/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native-community', +}; diff --git a/examples/v0.71.19/.gitignore b/examples/v0.71.19/.gitignore new file mode 100644 index 00000000..16f8c307 --- /dev/null +++ b/examples/v0.71.19/.gitignore @@ -0,0 +1,63 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +ios/.xcode.env.local + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof +.cxx/ +*.keystore +!debug.keystore + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output + +# Bundle artifact +*.jsbundle + +# Ruby / CocoaPods +/ios/Pods/ +/vendor/bundle/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* diff --git a/examples/v0.71.19/.node-version b/examples/v0.71.19/.node-version new file mode 100644 index 00000000..3c032078 --- /dev/null +++ b/examples/v0.71.19/.node-version @@ -0,0 +1 @@ +18 diff --git a/examples/v0.71.19/.prettierrc.js b/examples/v0.71.19/.prettierrc.js new file mode 100644 index 00000000..2b540746 --- /dev/null +++ b/examples/v0.71.19/.prettierrc.js @@ -0,0 +1,7 @@ +module.exports = { + arrowParens: 'avoid', + bracketSameLine: true, + bracketSpacing: false, + singleQuote: true, + trailingComma: 'all', +}; diff --git a/examples/v0.71.19/.watchmanconfig b/examples/v0.71.19/.watchmanconfig new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/examples/v0.71.19/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/examples/v0.71.19/App.tsx b/examples/v0.71.19/App.tsx new file mode 100644 index 00000000..05854f3a --- /dev/null +++ b/examples/v0.71.19/App.tsx @@ -0,0 +1,64 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + * + * @format + */ + +import { HotUpdater } from "@hot-updater/react-native"; +import type React from "react"; +import { useEffect, useState } from "react"; +import { Button, Image, SafeAreaView, Text } from "react-native"; + +HotUpdater.init({ + source: "https://gronxb.s3.ap-northeast-2.amazonaws.com/update.json", +}); + +function App(): React.JSX.Element { + const [version, setVersion] = useState(null); + + useEffect(() => { + HotUpdater.getBundleVersion().then((version) => { + setVersion(version); + }); + }, []); + + return ( + + + Hot Updater 0 + + + + BundleVersion: {version} + + + + +