See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
/* | |
Call pickDocAndSendToMail function on button click | |
*/ | |
//...other imports | |
import DocumentPicker from 'react-native-document-picker'; | |
import Mailer from 'react-native-mail'; | |
import RNFS from 'react-native-fs'; |
import React, { Component } from 'react'; | |
import { | |
View, | |
Text, | |
TouchableOpacity, | |
TextInput, | |
Animated, | |
Dimensions, | |
StyleSheet | |
} from 'react-native'; |
import React, { useState, useEffect } from 'react'; | |
import { View, StyleSheet, Button, Text } from 'react-native'; | |
// eslint-disable-next-line import/no-extraneous-dependencies | |
import uuidv4 from 'uuid/v4'; | |
const ReactHooks = () => { | |
const [count, setCount] = useState(0); | |
const [users, setUsers] = useState([]); | |
/* |
Hi @everyone | |
I have created a LoggerJs to log outputs to make debugging easy. Please have a look at it and tell if you find it useful. If not, I would be glad to know your response and your suggestions. | |
https://gist.github.com/ajaykumar97/d953710618f22a611b2c564f260e741d | |
It automatically disables the console.log if it is not the production environment. | |
It has different methods to log the out: |
baseUrl: http://0:0:0:0:8888/dummy1/v1/ | |
imagesPath: http://0:0:0:0:8888/dummy1/v1/thumbnail/(image_name)/width/height | |
Notes: | |
--> Send token in header in APIs like: | |
access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjExLCJpYXQiOjE1MzExMjM3NDAsImV4cCI6MTUzMzcxNTc0MH0.ARupD0Y3bvzvCVDHeZtTFNU_6cFjNmwTMrqsIjD_C7M | |
=========================== Request Status Codes ======================= | |
ACTION_COMPLETE: 200 |
import React from 'react'; | |
import { Button, TextInput, View, Text, StyleSheet } from 'react-native'; | |
import SplashScreen from 'react-native-splash-screen'; | |
import { Formik } from 'formik'; | |
import * as yup from 'yup'; | |
class MyReactNativeForm extends React.Component { | |
componentDidMount() { | |
SplashScreen.hide(); | |
} |
1. To generate SHA-1 key for android on Linux: | |
https://stackoverflow.com/a/34933381 | |
OR | |
For Debug mode: | |
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android | |
For Release mode: |
import React from 'react'; | |
import { GiftedChat } from 'react-native-gifted-chat'; | |
export default class Example extends React.Component { | |
state = { | |
messages: [], | |
}; | |
componentDidMount() { | |
this.setState({ |
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |