This repository has been archived by the owner on Oct 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
198 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
import React from 'react'; | ||
import { connect } from 'react-redux'; | ||
import s from './styles.css'; | ||
import { increment, decrement } from '../../redux/modules/app/app'; | ||
|
||
const Main = () => ( | ||
<div className={s.main}> | ||
<img src={require('./images/chvrches.jpg')}/> | ||
<div>Hello, world!</div> | ||
</div> | ||
); | ||
const Main = (props) => { | ||
const { | ||
counter, | ||
increment, | ||
decrement, | ||
} = props; | ||
|
||
export default Main; | ||
return ( | ||
<div className={s.main}> | ||
<div className={s.counterWrapper}> | ||
<button className={s.button} type="button" onClick={() => decrement()}>-</button> | ||
<span className={s.counter}>counter: {counter}</span> | ||
<button className={s.button} type="button" onClick={() => increment()}>+</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default connect( | ||
(state) => state.app.app, | ||
{ | ||
increment, | ||
decrement | ||
} | ||
)(Main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.