├── .watchmanconfig ├── .gitattributes ├── .babelrc ├── view ├── day12.js ├── img │ ├── w2.png │ ├── w3.png │ ├── agrass.png │ ├── day1.png │ ├── day2.png │ ├── day3.png │ ├── sphere.jpg │ ├── tumblr.png │ ├── moments.mp4 │ ├── poincare.png │ ├── tumblr-chat.png │ ├── tumblr-link.png │ ├── tumblr-text.png │ ├── tumblrblur.png │ ├── tumblr-audio.png │ ├── tumblr-photo.png │ └── tumblr-quote.png ├── dayTemplate.js ├── day29.js ├── day4.js ├── public │ ├── demo2.html │ ├── demo1.html │ └── js │ │ ├── sphere.js │ │ └── poincare-disk.js ├── utils.js ├── day25.js ├── day19.js ├── day17.js ├── day27.js ├── day30.js ├── day5.js ├── day21.js ├── day23.js ├── day7.js ├── day15.js ├── day16.js ├── day22.js ├── day11.js ├── day10.js ├── day26.js ├── day6.js ├── day13.js ├── day28.js ├── day24.js ├── day20.js ├── day8.js ├── day14.js └── day1.js ├── android ├── .gradle │ └── 2.4 │ │ └── taskArtifacts │ │ ├── cache.properties │ │ ├── fileHashes.bin │ │ ├── fileSnapshots.bin │ │ ├── taskArtifacts.bin │ │ ├── outputFileStates.bin │ │ └── cache.properties.lock ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ └── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── assets │ │ │ └── fonts │ │ │ │ ├── Entypo.ttf │ │ │ │ ├── Zocial.ttf │ │ │ │ ├── Ionicons.ttf │ │ │ │ ├── Octicons.ttf │ │ │ │ ├── EvilIcons.ttf │ │ │ │ ├── FontAwesome.ttf │ │ │ │ ├── Foundation.ttf │ │ │ │ └── MaterialIcons.ttf │ │ │ ├── java │ │ │ └── com │ │ │ │ └── thirtydaysofreactnative │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── AndroidManifest.xml │ ├── BUCK │ ├── proguard-rules.pro │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── keystores │ ├── debug.keystore.properties │ └── BUCK ├── build.gradle ├── settings.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── ios ├── ThirtyDaysOfReactNative │ ├── Images.xcassets │ │ ├── Contents.json │ │ ├── gl.imageset │ │ │ ├── gl.png │ │ │ └── Contents.json │ │ ├── map.imageset │ │ │ ├── map.png │ │ │ └── Contents.json │ │ ├── w2.imageset │ │ │ ├── w2.png │ │ │ └── Contents.json │ │ ├── w3.imageset │ │ │ ├── w3.png │ │ │ └── Contents.json │ │ ├── day1.imageset │ │ │ ├── day1.png │ │ │ └── Contents.json │ │ ├── day2.imageset │ │ │ ├── day2.png │ │ │ └── Contents.json │ │ ├── day3.imageset │ │ │ ├── day3.png │ │ │ └── Contents.json │ │ ├── icon.imageset │ │ │ ├── icon.png │ │ │ └── Contents.json │ │ ├── agrass.imageset │ │ │ ├── agrass.png │ │ │ └── Contents.json │ │ ├── banner.imageset │ │ │ ├── banner.png │ │ │ └── Contents.json │ │ ├── packed.imageset │ │ │ ├── packed.png │ │ │ └── Contents.json │ │ ├── tumblr.imageset │ │ │ ├── tumblr.png │ │ │ └── Contents.json │ │ ├── desktop.imageset │ │ │ ├── desktop.png │ │ │ └── Contents.json │ │ ├── minion1.imageset │ │ │ ├── minion1.png │ │ │ └── Contents.json │ │ ├── minion2.imageset │ │ │ ├── minion2.png │ │ │ └── Contents.json │ │ ├── minion3.imageset │ │ │ ├── minion3.png │ │ │ └── Contents.json │ │ ├── minion4.imageset │ │ │ ├── minion4.png │ │ │ └── Contents.json │ │ ├── minion5.imageset │ │ │ ├── minion5.png │ │ │ └── Contents.json │ │ ├── moreinfo.imageset │ │ │ ├── moreinfo.png │ │ │ └── Contents.json │ │ ├── bannerBlur.imageset │ │ │ ├── bannerBlur.png │ │ │ └── Contents.json │ │ ├── tumblrblur.imageset │ │ │ ├── tumblrblur.png │ │ │ └── Contents.json │ │ ├── tumblr-chat.imageset │ │ │ ├── tumblr-chat.png │ │ │ └── Contents.json │ │ ├── tumblr-link.imageset │ │ │ ├── tumblr-link.png │ │ │ └── Contents.json │ │ ├── tumblr-text.imageset │ │ │ ├── tumblr-text.png │ │ │ └── Contents.json │ │ ├── tumblr-audio.imageset │ │ │ ├── tumblr-audio.png │ │ │ └── Contents.json │ │ ├── tumblr-photo.imageset │ │ │ ├── tumblr-photo.png │ │ │ └── Contents.json │ │ ├── tumblr-quote.imageset │ │ │ ├── tumblr-quote.png │ │ │ └── Contents.json │ │ ├── google.imageset │ │ │ ├── googlelogo_color_272x92dp.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── main.m │ ├── AppDelegate.m │ ├── Info.plist │ └── Base.lproj │ │ └── LaunchScreen.xib ├── ThirtyDaysOfReactNativeTests │ ├── Info.plist │ └── ThirtyDaysOfReactNativeTests.m └── ThirtyDaysOfReactNative.xcodeproj │ └── xcshareddata │ └── xcschemes │ └── ThirtyDaysOfReactNative.xcscheme ├── package.json ├── .gitignore ├── .flowconfig └── README.md /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } -------------------------------------------------------------------------------- /view/day12.js: -------------------------------------------------------------------------------- 1 | // create chart without library -------------------------------------------------------------------------------- /android/.gradle/2.4/taskArtifacts/cache.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 05 20:01:44 MDT 2016 2 | -------------------------------------------------------------------------------- /view/img/w2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/w2.png -------------------------------------------------------------------------------- /view/img/w3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/w3.png -------------------------------------------------------------------------------- /view/img/agrass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/agrass.png -------------------------------------------------------------------------------- /view/img/day1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/day1.png -------------------------------------------------------------------------------- /view/img/day2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/day2.png -------------------------------------------------------------------------------- /view/img/day3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/day3.png -------------------------------------------------------------------------------- /view/img/sphere.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/sphere.jpg -------------------------------------------------------------------------------- /view/img/tumblr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/tumblr.png -------------------------------------------------------------------------------- /view/img/moments.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/moments.mp4 -------------------------------------------------------------------------------- /view/img/poincare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/poincare.png -------------------------------------------------------------------------------- /view/img/tumblr-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/tumblr-chat.png -------------------------------------------------------------------------------- /view/img/tumblr-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/tumblr-link.png -------------------------------------------------------------------------------- /view/img/tumblr-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/tumblr-text.png -------------------------------------------------------------------------------- /view/img/tumblrblur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/tumblrblur.png -------------------------------------------------------------------------------- /view/img/tumblr-audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/tumblr-audio.png -------------------------------------------------------------------------------- /view/img/tumblr-photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/tumblr-photo.png -------------------------------------------------------------------------------- /view/img/tumblr-quote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/view/img/tumblr-quote.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ThirtyDaysOfReactNative 3 | 4 | -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /android/.gradle/2.4/taskArtifacts/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/.gradle/2.4/taskArtifacts/fileHashes.bin -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/.gradle/2.4/taskArtifacts/fileSnapshots.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/.gradle/2.4/taskArtifacts/fileSnapshots.bin -------------------------------------------------------------------------------- /android/.gradle/2.4/taskArtifacts/taskArtifacts.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/.gradle/2.4/taskArtifacts/taskArtifacts.bin -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /android/.gradle/2.4/taskArtifacts/outputFileStates.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/.gradle/2.4/taskArtifacts/outputFileStates.bin -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/.gradle/2.4/taskArtifacts/cache.properties.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/android/.gradle/2.4/taskArtifacts/cache.properties.lock -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/gl.imageset/gl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/gl.imageset/gl.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/map.imageset/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/map.imageset/map.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/w2.imageset/w2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/w2.imageset/w2.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/w3.imageset/w3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/w3.imageset/w3.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/day1.imageset/day1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/day1.imageset/day1.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/day2.imageset/day2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/day2.imageset/day2.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/day3.imageset/day3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/day3.imageset/day3.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/icon.imageset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/icon.imageset/icon.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/agrass.imageset/agrass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/agrass.imageset/agrass.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/banner.imageset/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/banner.imageset/banner.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/packed.imageset/packed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/packed.imageset/packed.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr.imageset/tumblr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr.imageset/tumblr.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/desktop.imageset/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/desktop.imageset/desktop.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion1.imageset/minion1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/minion1.imageset/minion1.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion2.imageset/minion2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/minion2.imageset/minion2.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion3.imageset/minion3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/minion3.imageset/minion3.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion4.imageset/minion4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/minion4.imageset/minion4.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion5.imageset/minion5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/minion5.imageset/minion5.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/moreinfo.imageset/moreinfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/moreinfo.imageset/moreinfo.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/bannerBlur.imageset/bannerBlur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/bannerBlur.imageset/bannerBlur.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblrblur.imageset/tumblrblur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/tumblrblur.imageset/tumblrblur.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-chat.imageset/tumblr-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-chat.imageset/tumblr-chat.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-link.imageset/tumblr-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-link.imageset/tumblr-link.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-text.imageset/tumblr-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-text.imageset/tumblr-text.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-audio.imageset/tumblr-audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-audio.imageset/tumblr-audio.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-photo.imageset/tumblr-photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-photo.imageset/tumblr-photo.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-quote.imageset/tumblr-quote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-quote.imageset/tumblr-quote.png -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/google.imageset/googlelogo_color_272x92dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangwei716/30-days-of-react-native/HEAD/ios/ThirtyDaysOfReactNative/Images.xcassets/google.imageset/googlelogo_color_272x92dp.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /view/dayTemplate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Day 3 | * 4 | */ 5 | 'use strict'; 6 | 7 | import React,{ Component } from 'react'; 8 | import { Image,StyleSheet,Text,TouchableHighlight,View } from 'react-native'; 9 | import Util from './utils'; 10 | 11 | export default class extends Component{ 12 | render() { 13 | return( 14 | 15 | ) 16 | } 17 | } 18 | 19 | const styles = StyleSheet.create({ 20 | 21 | }); 22 | 23 | -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/day1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "day1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/day2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "day2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/day3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "day3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/gl.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "gl.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/map.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "map.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/w2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "w2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/w3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "w3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/agrass.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "agrass.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/banner.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "banner.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/packed.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "packed.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblr.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/desktop.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "desktop.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "minion1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "minion2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "minion3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "minion4.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/minion5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "minion5.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/moreinfo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "moreinfo.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/bannerBlur.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "bannerBlur.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-chat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblr-chat.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-link.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblr-link.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-text.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblr-text.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblrblur.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblrblur.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-audio.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblr-audio.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-photo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblr-photo.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/tumblr-quote.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "tumblr-quote.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/google.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "googlelogo_color_272x92dp.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/thirtydaysofreactnative/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.thirtydaysofreactnative; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.brentvatne.react.ReactVideoPackage; 5 | import com.oblador.vectoricons.VectorIconsPackage; 6 | 7 | public class MainActivity extends ReactActivity { 8 | 9 | /** 10 | * Returns the name of the main component registered from JavaScript. 11 | * This is used to schedule rendering of the component. 12 | */ 13 | @Override 14 | protected String getMainComponentName() { 15 | return "ThirtyDaysOfReactNative"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /view/day29.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Day 29 3 | * 3D Touch 4 | * in the index file 5 | */ 6 | 7 | 'use strict'; 8 | 9 | import React,{ Component } from 'react'; 10 | import { Image,StyleSheet,Text,TouchableHighlight,View } from 'react-native'; 11 | import Util from './utils'; 12 | 13 | export default class extends Component{ 14 | render() { 15 | return( 16 | 17 | Try 3D Touch on the home screen icon 18 | 19 | ) 20 | } 21 | } 22 | 23 | const styles = StyleSheet.create({ 24 | container:{ 25 | width: Util.size.width, 26 | height: Util.size.height, 27 | alignItems:"center", 28 | justifyContent: "center" 29 | }, 30 | text:{ 31 | fontSize:20, 32 | } 33 | }); 34 | 35 | 36 | -------------------------------------------------------------------------------- /view/day4.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Day 4 3 | * bridge to cocoapods 4 | */ 5 | 'use strict'; 6 | 7 | import React,{ Component } from 'react'; 8 | import { Image,StyleSheet,TouchableHighlight,View } from 'react-native'; 9 | 10 | 11 | export default class extends Component{ 12 | constructor() { 13 | super(); 14 | this.state = { 15 | show:false 16 | }; 17 | } 18 | 19 | _onImgPress() { 20 | this.setState({ 21 | show:false 22 | }) 23 | this.setState({ 24 | show:true 25 | }) 26 | } 27 | 28 | render() { 29 | return( 30 | 31 | 32 | ) 33 | } 34 | } 35 | 36 | const styles = StyleSheet.create({ 37 | img:{ 38 | height: 200, 39 | width: 300 40 | }, 41 | }); 42 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ThirtyDaysOfReactNative", 3 | "version": "0.0.1", 4 | "private": true, 5 | "author": "fangwei716", 6 | "scripts": { 7 | "start": "node node_modules/react-native/local-cli/cli.js start" 8 | }, 9 | "dependencies": { 10 | "gl-react": "^2.2.8", 11 | "gl-react-native": "^2.34.0", 12 | "react": "^15.4.2", 13 | "react-native": "^0.40.0", 14 | "react-native-chart": "^1.0.8-beta", 15 | "react-native-gesture-password": "^0.2.0", 16 | "react-native-linear-gradient": "^1.5.13", 17 | "react-native-maps": "^0.11.0", 18 | "react-native-scrollable-tab-view": "0.6.0", 19 | "react-native-swipe-cards": "0.0.9", 20 | "react-native-swiper": "^1.4.9", 21 | "react-native-vector-icons": "^4.3.0", 22 | "react-native-video": "^0.9.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /view/public/demo2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Poincare Disk demo 6 | 39 | 40 | 41 |
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ThirtyDaysOfReactNative' 2 | 3 | include ':app' 4 | include ':react-native-linear-gradient' 5 | project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android') 6 | include ':gl-react-native' 7 | project(':gl-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/gl-react-native/android') 8 | include ':react-native-video' 9 | project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android') 10 | include ':react-native-vector-icons' 11 | project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') 12 | include ':RNGL' 13 | project(':RNGL').projectDir = file('../node_modules/gl-react-native/android') -------------------------------------------------------------------------------- /view/public/demo1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Poincare Disk demo 6 | 40 | 41 | 42 |
43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNativeTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 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 | -------------------------------------------------------------------------------- /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: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 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 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/thirtydaysofreactnative/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.thirtydaysofreactnative; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.BV.LinearGradient.LinearGradientPackage; 8 | import com.projectseptember.RNGL.RNGLPackage; 9 | import com.facebook.react.ReactInstanceManager; 10 | import com.facebook.react.ReactNativeHost; 11 | import com.facebook.react.ReactPackage; 12 | import com.facebook.react.shell.MainReactPackage; 13 | import com.facebook.soloader.SoLoader; 14 | 15 | import java.util.Arrays; 16 | import java.util.List; 17 | 18 | public class MainApplication extends Application implements ReactApplication { 19 | 20 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 21 | @Override 22 | protected boolean getUseDeveloperSupport() { 23 | return BuildConfig.DEBUG; 24 | } 25 | 26 | @Override 27 | protected List getPackages() { 28 | return Arrays.asList( 29 | new MainReactPackage(), 30 | new LinearGradientPackage(), 31 | new RNGLPackage() 32 | ); 33 | } 34 | }; 35 | 36 | @Override 37 | public ReactNativeHost getReactNativeHost() { 38 | return mReactNativeHost; 39 | } 40 | 41 | @Override 42 | public void onCreate() { 43 | super.onCreate(); 44 | SoLoader.init(this, /* native exopackage */ false); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /view/utils.js: -------------------------------------------------------------------------------- 1 | // obtained from react native tutorials 2 | 3 | import React from 'react'; 4 | import { PixelRatio } from 'react-native'; 5 | import Dimensions from 'Dimensions'; 6 | 7 | const Util = { 8 | ratio: PixelRatio.get(), 9 | pixel: 1 / PixelRatio.get(), 10 | size: { 11 | width: Dimensions.get('window').width, 12 | height: Dimensions.get('window').height 13 | }, 14 | post(url, data, callback) { 15 | const fetchOptions = { 16 | method: 'POST', 17 | headers: { 18 | 'Accept': 'application/json', 19 | 'Content-Type': 'application/json' 20 | }, 21 | body: JSON.stringify(data) 22 | }; 23 | 24 | fetch(url, fetchOptions) 25 | .then((response) => { 26 | return response.json() 27 | }) 28 | .then((responseData) => { 29 | callback(responseData); 30 | }); 31 | }, 32 | key: 'BDKHFSDKJFHSDKFHWEFH-REACT-NATIVE', 33 | }; 34 | 35 | 36 | // import {StyleSheet, Platform} from 'react-native'; 37 | 38 | // export function create(styles: Object): {[name: string]: number} { 39 | // const platformStyles = {}; 40 | // Object.keys(styles).forEach((name) => { 41 | // let {ios, android, ...style} = {...styles[name]}; 42 | // if (ios && Platform.OS === 'ios') { 43 | // style = {...style, ...ios}; 44 | // } 45 | // if (android && Platform.OS === 'android') { 46 | // style = {...style, ...android}; 47 | // } 48 | // platformStyles[name] = style; 49 | // }); 50 | // return StyleSheet.create(platformStyles); 51 | // } 52 | 53 | export default Util; -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"ThirtyDaysOfReactNative" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directory 27 | node_modules 28 | 29 | # Optional npm cache directory 30 | .npm 31 | 32 | # Optional REPL history 33 | .node_repl_history 34 | 35 | 36 | # OSX 37 | # 38 | .DS_Store 39 | 40 | # Xcode 41 | # 42 | build/ 43 | *.pbxuser 44 | !default.pbxuser 45 | *.mode1v3 46 | !default.mode1v3 47 | *.mode2v3 48 | !default.mode2v3 49 | *.perspectivev3 50 | !default.perspectivev3 51 | xcuserdata 52 | *.xccheckout 53 | *.moved-aside 54 | DerivedData 55 | *.hmap 56 | *.ipa 57 | *.xcuserstate 58 | <<<<<<< ours 59 | project.xcworkspace 60 | ======= 61 | project.xcworkspace 62 | 63 | # Android/IntelliJ 64 | # 65 | build/ 66 | .idea 67 | .gradle 68 | local.properties 69 | *.iml 70 | 71 | # node.js 72 | # 73 | node_modules/ 74 | npm-debug.log 75 | 76 | # BUCK 77 | buck-out/ 78 | \.buckd/ 79 | android/app/libs 80 | *.keystore 81 | 82 | # fastlane 83 | # 84 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 85 | # screenshots whenever they are needed. 86 | # For more information about the recommended setup visit: 87 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 88 | 89 | fastlane/report.xml 90 | fastlane/Preview.html 91 | fastlane/screenshots 92 | >>>>>>> theirs 93 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.thirtydaysofreactnative', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.thirtydaysofreactnative', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /view/day25.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Day 25 3 | * custom refresh control 4 | * react-native-webbrowser has name space comflicts 5 | * use the module directly 6 | */ 7 | 8 | 'use strict'; 9 | 10 | import React,{ Component } from 'react'; 11 | import { Image,StyleSheet,Text,TouchableHighlight,ActionSheetIOS,View } from 'react-native'; 12 | import Util from './utils'; 13 | // import Webbrowser from 'react-native-webbrowser'; 14 | import Icon from 'react-native-vector-icons/Ionicons'; 15 | 16 | export default class extends Component{ 17 | _showShareActionSheet() { 18 | console.log(this.refs.browser.state.status); 19 | ActionSheetIOS.showShareActionSheetWithOptions({ 20 | url: this.refs.browser.state.currentUrl, 21 | message: this.refs.browser.state.status, 22 | }, 23 | (error) => console.log(error), 24 | (success, method) => { 25 | }); 26 | } 27 | 28 | render() { 29 | return ( 30 | 31 | this._showShareActionSheet()}> 32 | 33 | 34 | 35 | ); 36 | } 37 | } 38 | 39 | // 50 | 51 | const styles = StyleSheet.create({ 52 | shareIcon:{ 53 | position:"absolute", 54 | bottom:0, 55 | left: Util.size.width/2-15, 56 | } 57 | }); 58 | 59 | -------------------------------------------------------------------------------- /view/public/js/sphere.js: -------------------------------------------------------------------------------- 1 | var width = 480, 2 | height = 500, 3 | rotate = [10, -10], 4 | velocity = [.003, -.001], 5 | time = Date.now(); 6 | 7 | var projection = d3.geo.orthographic() 8 | .scale(160) 9 | .translate([width / 2, height / 2]) 10 | .clipAngle(90 + 1e-6) 11 | .precision(.3); 12 | 13 | var path = d3.geo.path() 14 | .projection(projection); 15 | 16 | var graticule = d3.geo.graticule(); 17 | 18 | var m0, o0; 19 | 20 | var drag = d3.behavior.drag() 21 | .on("dragstart", function() { 22 | var proj = projection.rotate(); 23 | m0 = [d3.event.sourceEvent.pageX, d3.event.sourceEvent.pageY]; 24 | o0 = [-proj[0],-proj[1]]; 25 | }) 26 | .on("drag", function() { 27 | var m1 = [d3.event.sourceEvent.pageX, d3.event.sourceEvent.pageY], 28 | o1 = [o0[0] + (m1[0] - m0[0]) / 4, o0[1] + (m1[1] - m0[1]) / 4]; 29 | projection.rotate([o1[0], -o1[1]]); 30 | path = d3.geo.path().projection(projection); 31 | svg.selectAll("path").attr("d", path); 32 | }); 33 | 34 | var svg = d3.select("#sphere").append("svg") 35 | .attr("width", width) 36 | .attr("height", height) 37 | .call(drag); 38 | 39 | svg.append("path") 40 | .datum({type: "Sphere"}) 41 | .attr("class", "sphere") 42 | .attr("d", path); 43 | 44 | svg.append("path") 45 | .datum(graticule) 46 | .attr("class", "graticule") 47 | .attr("d", path); 48 | 49 | svg.append("path") 50 | .datum({type: "LineString", coordinates: [[-180, 0], [-90, 0], [0, 0], [90, 0], [180, 0]]}) 51 | .attr("class", "equator") 52 | .attr("d", path); 53 | 54 | // var feature = svg.selectAll("path"); 55 | 56 | // d3.timer(function() { 57 | // var dt = Date.now() - time; 58 | // projection.rotate([rotate[0] + velocity[0] * dt, rotate[1] + velocity[1] * dt]); 59 | // feature.attr("d", path); 60 | // }); -------------------------------------------------------------------------------- /view/day19.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Day 19 3 | * 4 | */ 5 | 'use strict'; 6 | 7 | import React,{ Component } from 'react'; 8 | import { Image,StyleSheet,StatusBar,Text,AlertIOS,TouchableHighlight,View } from 'react-native'; 9 | import Util from './utils'; 10 | // import TouchID from 'react-native-touch-id'; 11 | import { EnterPassword } from './day16' 12 | 13 | class Main extends Component{ 14 | componentDidMount() { 15 | StatusBar.setBarStyle(0); 16 | } 17 | 18 | render() { 19 | return( 20 | 21 | You are in Day19 22 | 23 | ); 24 | } 25 | } 26 | 27 | class RequireTouchID extends Component{ 28 | constructor() { 29 | super(); 30 | this.state = { 31 | enterApp: false 32 | } 33 | } 34 | 35 | componentDidMount() { 36 | StatusBar.setBarStyle(1); 37 | this._touchID(); 38 | } 39 | 40 | _enterPassword(){ 41 | this.setState({ 42 | enterApp: true, 43 | }); 44 | } 45 | 46 | _touchID = () => { 47 | TouchID.authenticate('Unlock Day19') 48 | .then(success => { 49 | this.setState({ 50 | enterApp: true, 51 | }) 52 | }) 53 | .catch(error => { 54 | 55 | }); 56 | }; 57 | 58 | render() { 59 | return ( 60 | 61 | { this.state.enterApp? 62 |
: 63 | this._enterPassword()} password="123"/> 64 | } 65 | 66 | ); 67 | } 68 | } 69 | 70 | export default class extends Component{ 71 | render() { 72 | return( 73 | 74 | ) 75 | } 76 | } 77 | // 78 | 79 | const styles = StyleSheet.create({ 80 | container:{ 81 | backgroundColor:"transparent", 82 | height: Util.size.height, 83 | width: Util.size.width, 84 | }, 85 | main:{ 86 | justifyContent: "center", 87 | alignItems: "center", 88 | height: Util.size.height, 89 | width: Util.size.width, 90 | }, 91 | text:{ 92 | fontSize: 30 93 | }, 94 | }); 95 | 96 | -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNative/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSTemporaryExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UIAppFonts 39 | 40 | Entypo.ttf 41 | EvilIcons.ttf 42 | FontAwesome.ttf 43 | Foundation.ttf 44 | Ionicons.ttf 45 | MaterialIcons.ttf 46 | Octicons.ttf 47 | Zocial.ttf 48 | 49 | UILaunchStoryboardName 50 | LaunchScreen 51 | UIRequiredDeviceCapabilities 52 | 53 | armv7 54 | 55 | UISupportedInterfaceOrientations 56 | 57 | UIInterfaceOrientationPortrait 58 | UIInterfaceOrientationLandscapeLeft 59 | UIInterfaceOrientationLandscapeRight 60 | 61 | UIViewControllerBasedStatusBarAppearance 62 | 63 | NSPhotoLibraryUsageDescription 64 | need access 65 | 66 | -------------------------------------------------------------------------------- /ios/ThirtyDaysOfReactNativeTests/ThirtyDaysOfReactNativeTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface ThirtyDaysOfReactNativeTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation ThirtyDaysOfReactNativeTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /view/public/js/poincare-disk.js: -------------------------------------------------------------------------------- 1 | var R = 200, 2 | xoff = 50, 3 | yoff = 50; 4 | 5 | var tooltip = d3.select("body") 6 | .append("div") 7 | .style("position", "absolute") 8 | .style("z-index", "10") 9 | .style("visibility", "hidden") 10 | .style("background","rgba(0,0,0,0.7)") 11 | .style("padding","5px") 12 | .style("border-radius","2px") 13 | .style("width","250px") 14 | .style("color","#fff") 15 | .text("a simple tooltip") 16 | 17 | var vis = d3.select("#vis") 18 | .on("mousewheel", blockScroll) 19 | .on("DOMMouseScroll", blockScroll) 20 | .append("svg") 21 | .attr("width", "100%") 22 | .attr("height", "100%") 23 | .attr("pointer-events", "all") 24 | .call(d3.behavior.zoom() 25 | .on("zoom", redraw)) 26 | .append("g"); 27 | 28 | vis.append("circle") 29 | .attr("class", "line") 30 | .attr("cx", R + xoff) 31 | .attr("cy", R + yoff) 32 | .attr("r", R) 33 | 34 | for (var s=1.5; s<=144; s*=2) { 35 | for (var q1=0; q1<2*Math.PI; q1+=Math.PI/s) { 36 | var q2 = q1 + Math.PI/s; 37 | drawLine(q1, q2); 38 | } 39 | } 40 | 41 | function redraw() { 42 | vis 43 | .attr("transform", 44 | "translate(" + d3.event.translate + ")" 45 | + "scale(" + d3.event.scale + ")") 46 | .style("stroke-width", 1/d3.event.scale); 47 | } 48 | 49 | function drawArc(x1, y1, x2, y2, r1, r2) { 50 | vis.append("path") 51 | .attr("class", "line") 52 | .attr("d", "M" + x1 + "," + y1 + " " + 53 | "A" + r1 + "," + r2 + " 0 0,1 " + 54 | x2 + "," + y2) 55 | .on("mouseover", function(){ 56 | return tooltip.style("visibility", "visible") 57 | .text("points:("+Math.floor(x1)+" ,"+Math.floor(y1)+") &("+Math.floor(x2)+" ,"+Math.floor(y2)+") with radius: "+r1); 58 | }) 59 | .on("mousemove", function(){return tooltip.style("top", (event.pageY-10)+"px").style("left",(event.pageX+10)+"px");}) 60 | .on("mouseout", function(){return tooltip.style("visibility", "hidden");}); 61 | } 62 | 63 | function drawLine(q1, q2) { 64 | var f = (q2 - q1) / 2, 65 | dq = Math.abs(f), 66 | r = R * Math.tan(dq), 67 | rp = Math.sqrt(r * r + R * R), 68 | cx = xoff + R + rp * Math.cos(q1 + f), 69 | cy = yoff + R + rp * Math.sin(q1 + f), 70 | beta = Math.PI - dq * 2, 71 | k = Math.PI / 2 + q2; 72 | drawArc(cx + r * Math.cos(k), cy + r * Math.sin(k), 73 | cx + r * Math.cos(k + beta), cy + r * Math.sin(k + beta), 74 | r, r); 75 | } 76 | 77 | function blockScroll() { d3.event.preventDefault(); } 78 | -------------------------------------------------------------------------------- /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 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /view/day17.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Day 17 3 | * search bar 4 | */ 5 | 'use strict'; 6 | 7 | import React,{ Component } from 'react'; 8 | import { Image,StyleSheet,Text,TouchableHighlight,ScrollView,View } from 'react-native'; 9 | import Util from './utils'; 10 | // import SearchBar from 'react-native-search-bar'; 11 | // import fuzzy from 'fuzzy'; 12 | 13 | export default class extends Component{ 14 | constructor() { 15 | super(); 16 | 17 | const stateData = {"AL": "Alabama","AK": "Alaska","AS": "American Samoa","AZ": "Arizona","AR": "Arkansas","CA": "California","CO": "Colorado","CT": "Connecticut","DE": "Delaware","DC": "District Of Columbia","FM": "Federated States Of Micronesia","FL": "Florida","GA": "Georgia","GU": "Guam","HI": "Hawaii","ID": "Idaho","IL": "Illinois","IN": "Indiana","IA": "Iowa","KS": "Kansas","KY": "Kentucky","LA": "Louisiana","ME": "Maine","MH": "Marshall Islands","MD": "Maryland","MA": "Massachusetts","MI": "Michigan","MN": "Minnesota","MS": "Mississippi","MO": "Missouri","MT": "Montana","NE": "Nebraska","NV": "Nevada","NH": "New Hampshire","NJ": "New Jersey","NM": "New Mexico","NY": "New York","NC": "North Carolina","ND": "North Dakota","MP": "Northern Mariana Islands","OH": "Ohio","OK": "Oklahoma","OR": "Oregon","PW": "Palau","PA": "Pennsylvania","PR": "Puerto Rico","RI": "Rhode Island","SC": "South Carolina","SD": "South Dakota","TN": "Tennessee","TX": "Texas","UT": "Utah","VT": "Vermont","VI": "Virgin Islands","VA": "Virginia","WA": "Washington","WV": "West Virginia","WI": "Wisconsin","WY": "Wyoming"} 18 | this.states = []; 19 | for (let key in stateData) { 20 | if (stateData.hasOwnProperty(key)) { 21 | this.states.push(stateData[key]); 22 | } 23 | } 24 | 25 | this.state = { 26 | states: this.states, 27 | }; 28 | } 29 | 30 | _onChangeText(text) { 31 | let results = fuzzy.filter(text, this.states) 32 | let matches = results.map(function(el) { return el.string; }); 33 | this.setState({ 34 | states: matches, 35 | }) 36 | } 37 | 38 | render() { 39 | const statesList = this.state.states.map(function(elem, index) { 40 | return {elem}; 41 | }) 42 | 43 | return( 44 | 45 | {statesList} 46 | 47 | ) 48 | } 49 | } 50 | 51 | // this._onChangeText(text)} 55 | // /> 56 | 57 | const styles = StyleSheet.create({ 58 | container:{ 59 | backgroundColor:"#ffffff", 60 | marginTop: 63 61 | }, 62 | list:{ 63 | height:40, 64 | paddingLeft:20, 65 | justifyContent:"center", 66 | borderBottomColor:"#aaa", 67 | borderBottomWidth: Util.pixel, 68 | } 69 | }); 70 | 71 | -------------------------------------------------------------------------------- /view/day27.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Day 27 3 | * imessage gradient color 4 | * demo purpuses only 5 | * use https://github.com/tstone/Gradient.js to generate more color options 6 | */ 7 | 'use strict'; 8 | 9 | import React,{ Component } from 'react'; 10 | import { findNodeHandle,Image,StyleSheet,Text,TouchableHighlight,ScrollView,View } from 'react-native'; 11 | import Util from './utils'; 12 | import LinearGradient from 'react-native-linear-gradient'; 13 | import { UIManager } from 'NativeModules'; 14 | 15 | export default class extends Component{ 16 | constructor() { 17 | super(); 18 | this.state = { 19 | color: [['rgba(32,138,246,0.9)', 'rgba(32,138,246,0.92)', 'rgba(32,138,246,0.95)'],['rgba(32,138,246,0.92)', 'rgba(32,138,246,0.95)', 'rgba(32,138,246,0.98)'],['rgba(32,138,246,0.96)', 'rgba(32,138,246,0.98)', 'rgba(32,138,246,1)']], 20 | msg:["An iMessage Gradient effect","Color should change by scroll pageY","testing..."], 21 | } 22 | } 23 | 24 | _handleScroll = (event) => { 25 | for (var i = this.state.msg.length-1; i >= 0; i--) { 26 | this._changeColor(i); 27 | } 28 | }; 29 | 30 | _changeColor = (index)=> { 31 | const wHeight = Util.size.height; 32 | let view = this.refs['msg'+index]; // Where view is a ref obtained through 33 | let handle = findNodeHandle(view); 34 | UIManager.measure(handle, (x, y, width, height, pageX, pageY) => { 35 | let initOpacity = Math.pow((pageY/wHeight),2) + 0.5; 36 | let colors = ['rgba(32,138,246,'+initOpacity+')', 'rgba(32,138,246,'+(initOpacity+0.05)+')', 'rgba(32,138,246,'+(initOpacity+0.1)+')']; 37 | let color = this.state.color; 38 | color[index] = colors; 39 | this.setState({ 40 | color: color, 41 | }) 42 | }) 43 | }; 44 | 45 | render() { 46 | const {color,msg} = this.state; 47 | const total = msg.length; 48 | const linears = msg.map((elem, index) => { 49 | return ( 50 | 51 | {elem} 52 | 53 | ); 54 | }) 55 | return( 56 | 57 | 58 | {linears} 59 | 60 | 61 | ) 62 | } 63 | } 64 | 65 | const styles = StyleSheet.create({ 66 | container:{ 67 | backgroundColor:"#ffffff", 68 | }, 69 | linearGradient: { 70 | // width:90,s 71 | height: 26, 72 | paddingLeft: 15, 73 | paddingRight: 15, 74 | borderRadius: 13, 75 | alignItems:"center", 76 | justifyContent: "center", 77 | position:"absolute", 78 | right:10, 79 | }, 80 | text:{ 81 | color:"#fff", 82 | backgroundColor:"transparent", 83 | } 84 | }); 85 | 86 | -------------------------------------------------------------------------------- /view/day30.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Day 30 3 | * push notification 4 | */ 5 | 'use strict'; 6 | 7 | import React,{ Component } from 'react'; 8 | import { PushNotificationIOS,StyleSheet,Text,TouchableHighlight,View } from 'react-native'; 9 | import Util from './utils'; 10 | 11 | class Button extends Component{ 12 | render() { 13 | return ( 14 | 18 | 19 | {this.props.label} 20 | 21 | 22 | ); 23 | } 24 | } 25 | 26 | export default class extends Component{ 27 | componentWillMount() { 28 | PushNotificationIOS.addEventListener('notification', this._onNotification); 29 | } 30 | 31 | componentWillUnmount() { 32 | PushNotificationIOS.removeEventListener('notification', this._onNotification); 33 | } 34 | 35 | _onNotification(notification) { 36 | 37 | PushNotificationIOS.presentLocalNotification({ 38 | alertBody:notification.getMessage(), 39 | }); 40 | let numOfBadge = PushNotificationIOS.getApplicationIconBadgeNumber((num) => { 41 | let add = parseInt(notification.getBadgeCount(), 10); 42 | PushNotificationIOS.setApplicationIconBadgeNumber(num+add); 43 | }); 44 | 45 | } 46 | 47 | _sendNotification() { 48 | require('RCTDeviceEventEmitter').emit('remoteNotificationReceived', { 49 | aps: { 50 | alert: 'This is the 30th day of this project', 51 | badge: '1', 52 | sound: 'default', 53 | }, 54 | }); 55 | } 56 | 57 | render() { 58 | PushNotificationIOS.requestPermissions(); 59 | return ( 60 | 61 |