Skip to content

Instantly share code, notes, and snippets.

View dheysonalves's full-sized avatar
🧘‍♂️

Dheyson Alves dheysonalves

🧘‍♂️
View GitHub Profile
@dheysonalves
dheysonalves / .editorconfig
Last active April 22, 2020 14:27
personal-editorconfig
root = true
[*]
indent_style = tab
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@dheysonalves
dheysonalves / .eslintrc.json
Created January 27, 2020 02:50
rockeseat-eslintconfig
{
"parser": "babel-eslint",
"env": {
"es6": true,
"jest": true
},
"extends": [
"airbnb",
"plugin:react-native/all",
"prettier",
@dheysonalves
dheysonalves / app.jsx
Created March 1, 2020 17:51
My TODO CODER config
import "modules/bootstrap/dist/css/bootstrap.min.css";
import "modules/font-awesome/css/font-awesome.min.css";
import React from 'react';
import Todo from '../todo/todo';
export default props => (
<div className='container'>
<Todo/>
<About/>
@dheysonalves
dheysonalves / global.js
Created March 3, 2020 03:35
Global Css Style - Style Components
import { createGlobalStyle } from 'styled-components';
export default createGlobalStyle`
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
* {
margin: 0;
padding: 0;
outline: 0;
box-sizing: border-box;
@dheysonalves
dheysonalves / Structure.md
Last active March 21, 2020 15:38
React Native - Base structure

Credits

Project structure

Basic Structure

Explanation

screens

@dheysonalves
dheysonalves / extensions.json
Created March 21, 2020 18:42
Angular debug vscode config
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"loiane.angular-extension-pack",
"loiane.ts-extension-pack",
"ms-vscode.vscode-node-azure-pack",
"Shan.code-settings-sync",
@dheysonalves
dheysonalves / index.html
Last active March 22, 2020 14:59
Array.from example
<!DOCTYPE html>
<html>
<head>
<title>Array from example</title>
</head>
<body>
<ul id="list">
<li>Hip hop</li>
@dheysonalves
dheysonalves / React Native Clear Cache
Created July 20, 2020 16:37 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
import React, { useReducer } from "react";
import { StyleSheet, Text, View, Switch } from "react-native";
const reducer = (state, action) => {
switch (action.type) {
case "switch_one":
return { ...state, one: false };
case "switch_two":
return { ...state, two: false };
case "switch_three":
import React, { useState } from 'react'
import { StyleSheet, Text, View, TextInput } from 'react-native'
const TextScreen = () => {
const [name, setName] = useState('');
const [password, setPassword] = useState("");
return (
<View>