Skip to content

Instantly share code, notes, and snippets.

View ReneSena's full-sized avatar
🚀
The sky is the limit

Rene Sena ReneSena

🚀
The sky is the limit
View GitHub Profile
@ReneSena
ReneSena / combine_function.js
Last active November 17, 2020 20:01
Combine function = map, filter and reduce
const numbers = [1,2,3,45,10,4];
numbers
.map(number => number * 2) /*[2,4,6,90,20,8]*/
.filter(number => number > 10) /*[90, 20] */
.reduce((total, number) => total + number); /*110*/
@ReneSena
ReneSena / .js
Created January 27, 2021 03:22
Componente simples de player, para adicionar nos projetos da imersão alura.
import React, { useRef, useState } from "react";
import Song from "../../assets/audio/song.mp3";
import styled from "styled-components";
export const Container = styled.div`
width: 50px;
height: 50px;
background-color: #fff;
border-radius: 50px;
display: flex;