Skip to content

Instantly share code, notes, and snippets.

View mbeaudru's full-sized avatar

Manuel Beaudru mbeaudru

View GitHub Profile
@mbeaudru
mbeaudru / TodosContainer.jsx
Created August 20, 2018 15:19
@Medium - Render Props are the new Controllers / Container sample
import React, { Component, Fragment } from "react";
import TodosController from "../controllers/TodosController";
import TodoItem from "./TodoItem";
class TodosContainer extends Component {
state = {
todoInput: ""
};
updateTodoInputValue = value => this.setState({ todoInput: value });
@mbeaudru
mbeaudru / Checkbox.js
Created March 22, 2017 09:06
Checkbox with styled-components
import React, { Component, PropTypes } from 'react';
import styled from 'styled-components';
class Checkbox extends Component {
render() {
return (
<Styled
onClick={() => this.props.onChange(!this.props.checked)}
>
<input