import React from 'react' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import { namespaceConfig } from 'fast-redux' import Link from 'next/link' const DEFAULT_STATE = { build: 1 } const { actionCreator, getState: getHomepageState } = namespaceConfig( 'homepage', DEFAULT_STATE ) const bumpBuild = actionCreator(function bumpBuild (state, increment) { return { ...state, build: state.build + increment } }) const Homepage = ({ build, bumpBuild }) => (

Homepage

Current build: {build}

About Us
) function mapStateToProps (state) { return getHomepageState(state) } function mapDispatchToProps (dispatch) { return bindActionCreators({ bumpBuild }, dispatch) } export default connect( mapStateToProps, mapDispatchToProps )(Homepage)