Skip to content

Instantly share code, notes, and snippets.

View hungdev's full-sized avatar
💭
I may be slow to respond.

Hung Vu hungdev

💭
I may be slow to respond.
View GitHub Profile
@hungdev
hungdev / Pull to refresh.md
Last active February 23, 2020 14:04
Pull to refresh

đặt cái props này ở trong scrollview ( view bao ngoài cùng ) hoặc trong flatlist

refreshControl={
            <RefreshControl
              refreshing={this.state.refreshing}
              onRefresh={this._onRefresh.bind(this)}
            />
          }
@hungdev
hungdev / Load more.md
Last active November 3, 2018 07:09
Load more

import React, { Component } from "react";
import { View, Text, FlatList, ActivityIndicator } from "react-native";
// import { List, ListItem, SearchBar } from "react-native-elements";

class FlatListDemo extends Component {
  constructor(props) {
    super(props);
@hungdev
hungdev / stop watch.md
Last active August 6, 2019 10:37
stop watch
import React, { Component } from 'react';
import { render } from 'react-dom';
import Hello from './Hello';
import './style.css';
import Stopwatch from 'react-stopwatch'
import moment from 'moment'
import TimerMixin from 'react-timer-mixin';

class App extends Component {
@hungdev
hungdev / transaction left to right react navigation.md
Created October 25, 2018 17:53
transaction left to right react navigation

transaction left to right react navigation

const transition = () => ({
  screenInterpolator: sceneProps => {
    const { layout, position, scene } = sceneProps;
    const { index } = scene;
    const width = layout.initWidth;

    return {
@hungdev
hungdev / setup login fb react native.md
Last active October 28, 2018 12:11
setup login fb react native

Setup login fb cho Android app

các bước vẫn làm theo docs:

https://github.com/facebook/react-native-fbsdk#2-install-javascript-packages

b1:

npm install react-native-fbsdk react-native link react-native-fbsdk

@hungdev
hungdev / remove border header react navigation.md
Created October 28, 2018 13:38
remove border header react navigation
    navigationOptions: {
      headerStyle: {
        // iOS
        borderBottomWidth: 0,
        shadowOpacity: 0,
        // Android
        elevation: 0,
      }
 },
@hungdev
hungdev / Permision facebook login react native.md
Last active October 31, 2018 13:38
Permision facebook login react native

Nếu chỉ cần permission public_profileemail thì ko cần xin quyền từ facebook, còn khi muốn get pages hoặc 1 số cái khác thì phải xin quyền từ fb. link xin quyền và hướng dẫn xin quyền có trong link dưới. Nó yêu cầu cả icon và 1 số thông tin liên quan đến app, nên cần chuẩn bị trước.

link docs các permissions: https://developers.facebook.com/docs/facebook-login/permissions/#reference-manage_pages

link xin quyền:

https://developers.facebook.com/docs/apps/review#app-review
@hungdev
hungdev / react-file-upload.js
Created November 10, 2018 16:25 — forked from AshikNesin/react-file-upload.js
Simple React File Upload
import React from 'react'
import axios, { post } from 'axios';
class SimpleReactFileUpload extends React.Component {
constructor(props) {
super(props);
this.state ={
file:null
}
@hungdev
hungdev / gist:ddf1a2f9ace4dad6f01fed2e9e363a28
Created December 12, 2018 14:43
The-Shapes-of-React-Native
https://codedaily.io/tutorials/22/The-Shapes-of-React-Native?fbclid=IwAR0kNj4IC3DWpUgpGmTBnfQhve37sIy67wfbu_qM5SUIg-ORaFcE-_u_I90