Skip to content

Instantly share code, notes, and snippets.

@velopert

velopert/App.js Secret

Last active Aug 23, 2016
Embed
What would you like to do?
Redux Counter Initial VIEW
/*
components/App.js
*/
import React from 'react';
import Counter from 'components/Counter';
import Controls from 'components/Controls';
class App extends React.Component {
render(){
return (
<div>
<Counter/>
<Controls/>
</div>
);
}
}
export default App;
/*
components/Controls.js
*/
import React from 'react';
export default class Controls extends React.Component {
render() {
return (
<div>
<input type="text"/>
<button>+</button>
<button>-</button>
<button>HIDE</button>
</div>
);
}
}
/*
components/Counter.js
*/
import React from 'react';
export default class Counter extends React.Component {
render() {
return (
<div>
<h1>{ this.props.value }</h1>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment