Skip to content

Instantly share code, notes, and snippets.

View Tautorn's full-sized avatar
💭
👾 Let's code

Bruno Carneiro Tautorn

💭
👾 Let's code
View GitHub Profile
@Tautorn
Tautorn / App.js
Created December 12, 2019 09:29
Utilizar CSS com React - Form com Classes
import React from 'react';
import Logo from './logo.png';
import './style.css';
function App() {
return (
<div>
<div className="header">
<img src={Logo} alt="spotify" width="68px" />
<span className="title">Spotify</span>
@Tautorn
Tautorn / style.css
Created December 12, 2019 09:24
Utilizar CSS com React - Form
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
box-sizing: border-box;
background:#2E3034;
@Tautorn
Tautorn / App.js
Last active December 12, 2019 09:20
Utilizar CSS com React - Form
import React from 'react';
import Logo from './logo.png';
function App() {
return (
<div>
<div>
<img src={Logo} alt="spotify" width="68px" />
<span>Spotify</span>
</div>
@Tautorn
Tautorn / medium-hooks-example.jsx
Created June 24, 2019 09:53
React HOOK example
import React, { useEffects, useState } from 'react'
const Twitter = () => {
const [isLoading, setIsloading] = useState(true)
useEffects(() => {
window.setTimeout(() => {
setIsloading(false)
}, 2000)
}, [])
@Tautorn
Tautorn / medium-hooks-class-example.jsx
Last active June 24, 2019 09:51
React HOOK class scope example
import React, { Component } from 'react'
class Twitter extends Component {
state = {
isLoading: true
}
constructor(props) {
super(props)
@Tautorn
Tautorn / medium-hoc-react-app-hoc.jsx
Last active June 10, 2019 01:06
React HOC Example
import React from 'react'
import Cup from './components/Cup'
import Loading from './loading.gif'
const withDrink = (WrapperComponent, recipe) => {
const ComponentEnhanced = (props) => {
const isCompleted = props.completed
@Tautorn
Tautorn / medium-hoc-react-app-lager.jsx
Last active June 10, 2019 01:07
React HOC Lager Container Example
import React from 'react'
import withDrink from '../hoc'
const recipe = {
malte: '1,2kg',
water: '12l',
hops: '12g',
maturation: '1000'
}
@Tautorn
Tautorn / medium-hoc-react-app-wise.jsx
Last active June 10, 2019 01:07
React HOC Wise Container Example
import React from 'react'
import withDrink from '../hoc'
const recipe = {
malte: '1kg',
water: '14l',
hops: '12g',
maturation: '1500'
}
@Tautorn
Tautorn / medium-hoc-react-app-ale.jsx
Created June 9, 2019 21:50
React HOC Ale Container Example
import React from 'react'
import withDrink from '../hoc'
const recipe = {
malte: '1kg',
water: '16l',
hops: '10g',
maturation: '1000'
}
@Tautorn
Tautorn / medium-hoc-react-app.jsx
Created June 5, 2019 00:58
React HOC Example
import React, { Component } from 'react'
import Lager from './containers/Lager'
import Wise from './containers/Wise'
import Ale from './containers/Ale'
class App extends Component {
state = {
lager: false,
wise: false,
ale: false