Skip to content

Instantly share code, notes, and snippets.

@rs6000
rs6000 / todolist_ver001.html
Last active August 12, 2022 23:32
React ToDoList in single file (最陽春版本)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CDN -->
<!-- react -->
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
@rs6000
rs6000 / Hello_React.html
Created August 12, 2022 20:31
Get started React in single file with CDN
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CDN -->
<!-- react -->
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
@rs6000
rs6000 / jsontodataframe.ipynb
Last active March 25, 2022 23:55
Json convert to Dataframe
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rs6000
rs6000 / App.js
Created February 20, 2022 08:52
React Native UI Example - Food
// App.js
import 'react-native-gesture-handler';
import React from 'react';
import { StatusBar } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import COLORS from './src/consts/colors';
import DetailsScreen from './src/views/screens/DetailsScreen';
import BottomNavigator from './src/views/navigation/BottomNavigator';
@rs6000
rs6000 / RN_Example_PetUI_App.js
Created February 10, 2022 22:25
React Native UI Example - Pet
import 'react-native-gesture-handler';
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import DrawerNavigator from './src/views/navigators/DrawerNavigator';
import DetailsScreen from './src/views/screens/DetailsScreen';
const Stack = createNativeStackNavigator();
@rs6000
rs6000 / RN_Example_HotelUI_App.js
Created February 4, 2022 06:14
React Native UI Example - Hotel
// YT_Example_HotelUI0129\App.js
import React from 'react';
//從上個範例的原始碼就有加 但我都沒加~ 看不出沒加會怎樣
import "react-native-gesture-handler";
import { View, Text } from 'react-native';
import { StatusBar } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import COLORS from "./src/consts/colors";
import HomeScreen from "./src/views/screens/HomeScreen"
@rs6000
rs6000 / RN_Example_PlantUI_App.js
Last active February 4, 2022 06:02
React Native UI Example - PlantShop
// yt_example_plantui0128/App.js
import * as React from 'react';
import { View, Text } from 'react-native';
import { StatusBar } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import COLORS from "./src/consts/Colors";
import HomeScreen from "./src/view/screens/HomeScreen"
import DetailsScreen from "./src/view/screens/DetailsScreen"
@rs6000
rs6000 / RN_Example_BookSearch_app.js
Last active January 20, 2022 17:14
Expo_Barcode_BookSearch
```
source form React Native 教學 - 編寫一個圖書資訊 APP - Code Guy Studio
https://codeguy.studio/react-native-tutorial/book-app/
```
import React, { useEffect, useState } from 'react';
import {
ScrollView,
View,
StyleSheet,
@rs6000
rs6000 / expo_barcode_app.js
Last active January 19, 2022 02:07
react native expo barcode module
import { StatusBar } from 'expo-status-bar';
import React, { useState, useEffect } from 'react';
import { Text, View, StyleSheet, Button } from 'react-native';
import { BarCodeScanner } from 'expo-barcode-scanner';
export default function App() {
const [hasPermission, setHasPermission] = useState(null)
const [scanned, setScanned] = useState(false)
const [text, setText] = useState("Not yet scanned!")
@rs6000
rs6000 / expo_camera_app.js
Last active January 18, 2022 03:06
react native expo camera
import React, { useState, useEffect, useRef } from 'react';
import { SafeAreaView, StyleSheet, Text, View, TouchableOpacity, Modal, Image, Alert } from 'react-native';
import { Camera } from 'expo-camera';
import { CameraType } from 'expo-camera/build/Camera.types';
import { FontAwesome, Ionicons } from '@expo/vector-icons';
// import * as Permissions from "expo-permissions";
import * as Location from 'expo-location';
import * as MediaLibrary from "expo-media-library";