Skip to content

Instantly share code, notes, and snippets.

View dandelionadia's full-sized avatar
👾

Nadiia Ridko dandelionadia

👾
  • Prague, Czech Republic
View GitHub Profile
import React, { useState, useEffect } from 'react'
import styled from 'styled-components'
import { Box } from 'atomic-layout'
const StyledInput = styled.input`
background-color: #282828;
color: #fff;
width: 100%;
padding: 16px;
border: none;
@dandelionadia
dandelionadia / MyComponentClass.jsx
Created September 22, 2019 12:06
React setState/useState comparison
class MyComponent extends React.Components {
constructor () {
this.state = {
a: 0,
b: 'foo'
}
}
handerClick = () => {
this.setState({