Skip to content

Instantly share code, notes, and snippets.

View vamsiampolu's full-sized avatar

Vamsi Ampolu vamsiampolu

  • Sydney, Australia
View GitHub Profile
@vamsiampolu
vamsiampolu / callingChildComponentInRender.js
Last active August 7, 2018 15:11 — forked from coryhouse/callingChildComponentInRender.js
Example of calling extracted child component in render to avoid binding or declaring an arrow function
import React from 'react';
import UserListItem from './UserListItem';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
users: [
{ id: 1, name: 'Cory' },
{ id: 2, name: 'Meg' }