Skip to content

Instantly share code, notes, and snippets.

View reciosonny's full-sized avatar
🎯
Focusing

Sonny R. Recio reciosonny

🎯
Focusing
View GitHub Profile
class App extends React.Component {
state = { clicked: false, initialized: false };
componentDidMount() {
this.setState({ initialized: true });
}
setClicked = () => {
this.setState({ clicked: true });
function App() {
const [firstName, setFirstName] = useState("");
const [middleName, setMiddleName] = useState("");
const [lastName, setLastName] = useState("");
return (
<div className="App">
<PersonalInformation
firstName={firstName}
middleName={middleName}
function App() {
const [firstName, setFirstName] = useState("");
const [middleName, setMiddleName] = useState("");
const [lastName, setLastName] = useState("");
return (
<div className="App">
</div>
function PersonalInformation({
firstName,
middleName,
lastName,
setFirstName,
setMiddleName,
setLastName
}) {
return (
<div>
export default class ContainerComponent extends Component {
state = { firstName: "", lastName: "", address: "", data: [] };
componentDidMount() {
axios.get("/url/blablabla").then(res => this.setState({ data: res.data }));
}
onChangeEvent = () => {
// Complex logic here...
import styled from "styled-components";
const Button = styled.a`
text-decoration: none;
color: #fff;
background-color: #26a69a;
text-align: center;
letter-spacing: 0.5px;
@reciosonny
reciosonny / mixins-boilerplate.scss
Last active August 3, 2019 03:11
Boilerplate for mixins
// MEDIA QUERY MANAGER
/*
0 - 600px: Phone
600 - 900px: Tablet portrait
900 - 1200px: Tablet landscape
[1200 - 1800] is where our normal styles apply
1800px + : Big desktop
$breakpoint arguement choices:
- phone
import "./SchemaTablesList.css";
import React, { Component } from "react";
import { bindActionCreators } from "redux";
import { connect } from "react-redux";
import _ from "lodash";
import { withRouter } from "react-router-dom";
/* ACTIONS */
import { initializeTables, deleteTablesInSchema } from "../Actions/index";
use iframer;
update sale s set FullyPaid=1
where YEAR(s.Created) between 2012 and 2018 and s.FramerID = 'bea8ac99-04dd-48da-8db8-ba572bf8ffe2';
select * from sale s
@reciosonny
reciosonny / sampleJsx.js
Created February 21, 2018 02:24
Sample JSX
import React, { Component, Fragment } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
componentDidMount() {
}