From 08f2c8a35ca6a69da6fc2b37833e4f85bab07cec Mon Sep 17 00:00:00 2001 From: David Katz <15Dkatz@shcp.edu> Date: Sun, 23 Oct 2022 13:52:57 -0700 Subject: [PATCH] Redux-Based UI --- evens-or-odds/src/components/App.js | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/evens-or-odds/src/components/App.js b/evens-or-odds/src/components/App.js index d6e1e83..73e6b03 100644 --- a/evens-or-odds/src/components/App.js +++ b/evens-or-odds/src/components/App.js @@ -1,12 +1,38 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; +import { startGame, cancelGame } from '../actions/settings'; class App extends Component { + startGame = () => { + this.props.dispatch(startGame()) + } + + cancelGame = () => { + this.props.dispatch(cancelGame()) + } + render() { console.log('this', this); return ( -