Skip to content

Instantly share code, notes, and snippets.

View Sangrene's full-sized avatar

Hugo Laplace-Builhe Sangrene

View GitHub Profile
@Sangrene
Sangrene / .npmrc
Created December 17, 2018 13:59
.npmrc for AWS ELB to install dependencies using node-gyp
unsafe-perm=true
import React from "react";
import { TouchableOpacity, Text, ViewStyle, StyleSheet, StyleProp } from "react-native";
import { fonts } from "../styles";
interface Props{
onPress?() : void;
centerText: string;
backgroundColor: string;
textColor: string;
style?: ViewStyle;
function Square(props) { // The properties of the square contain the "onClick" function as well as the "value" number
return (
<button className="square"
onClick={props.onClick}>{/** (1) When I click on the button, it triggers the function onClick from the props object. */}
{props.value}
</button>
);
}