Skip to content

Instantly share code, notes, and snippets.

View vdelacou's full-sized avatar

Vincent DELACOURT vdelacou

View GitHub Profile
@vdelacou
vdelacou / react-undraw-illustrations.d.ts
Created April 28, 2019 03:34
Typescript description Types for react-undraw-illustrations
import { FunctionComponent } from "react";
type Undraw = {
/**
* Hex color
* @default #43d1a0
*/
accentColor?: _propTypes2.default.string;
/**
* custom class for svg
@vdelacou
vdelacou / routes.tsx
Created January 16, 2019 02:44
React navigation Define Routes example
import { createAppContainer, createStackNavigator } from "react-navigation";
import { DetailScreen } from "../screens/detail_screen";
import { HomeScreen } from "../screens/home_screen";
import { ModalScreen } from "../screens/modal_screen";
export enum ROUTES {
RootMain = "RootMain",
RootModal = "RootModal",
RootDetails = "RootDetails",
ModalMain = "ModalMain",
@vdelacou
vdelacou / routes.tsx
Created January 16, 2019 02:44
React navigation Define Routes example
import { createAppContainer, createStackNavigator } from "react-navigation";
import { DetailScreen } from "../screens/detail_screen";
import { HomeScreen } from "../screens/home_screen";
import { ModalScreen } from "../screens/modal_screen";
export enum ROUTES {
RootMain = "RootMain",
RootModal = "RootModal",
RootDetails = "RootDetails",
ModalMain = "ModalMain",
@vdelacou
vdelacou / routes.tsx
Created January 16, 2019 02:44
React navigation Define Routes example
import { createAppContainer, createStackNavigator } from "react-navigation";
import { DetailScreen } from "../screens/detail_screen";
import { HomeScreen } from "../screens/home_screen";
import { ModalScreen } from "../screens/modal_screen";
export enum ROUTES {
RootMain = "RootMain",
RootModal = "RootModal",
RootDetails = "RootDetails",
ModalMain = "ModalMain",
@vdelacou
vdelacou / home_screen.tsx
Last active January 16, 2019 03:14
React navigation Home Screen example
import React, { PureComponent } from "react";
import { GestureResponderEvent, StyleSheet, Text, View } from "react-native";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import {
NavigationScreenProps,
NavigationStackScreenOptions
} from "react-navigation";
import { ROUTES } from "../../routes";
/**
@vdelacou
vdelacou / modal_screen.tsx
Last active January 16, 2019 03:14
React navigation Modal Screen example
import React, { PureComponent } from "react";
import { GestureResponderEvent, StyleSheet, Text, View } from "react-native";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import {
NavigationScreenProps,
NavigationStackScreenOptions
} from "react-navigation";
import { ROUTES } from "../../routes";
/**
@vdelacou
vdelacou / detail_screen.tsx
Last active January 16, 2019 03:14
React navigation Detail Screen example
import React, { PureComponent } from "react";
import { StyleSheet, Text, View } from "react-native";
import { NavigationScreenProps } from "react-navigation";
/**
* The Details screen
*/
export class DetailScreen extends PureComponent<NavigationScreenProps> {
render() {
return (
@vdelacou
vdelacou / settings.json5
Last active February 18, 2019 03:43
VSCode settings for React and React Native Project
// Place your settings in this file to overwrite default and user settings.
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"typescript.format.enable": false,
"javascript.format.enable": false,
"typescript.implementationsCodeLens.enabled": true,
"editor.trimAutoWhitespace": true,
@vdelacou
vdelacou / extensions.json5
Last active February 14, 2019 10:15
VsCode recommend extension for React or React-Native Project
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
"ms-vscode.vscode-typescript-tslint-plugin",
"esbenp.prettier-vscode",
"codezombiech.gitignore"
]
}
@vdelacou
vdelacou / tslint.json5
Last active May 15, 2019 04:54
TSLint config file for React or React-native project
{
"extends": [
"tslint:recommended",
"tslint-config-standard",
"tslint-etc",
"tslint-react",
"tslint-react-hooks",
"tslint-config-prettier"
],
"rules": {