Skip to content

Instantly share code, notes, and snippets.

@dapperAuteur
Created April 22, 2019 20:44
Show Gist options
  • Save dapperAuteur/9c29197d6f52603852a4665974521ae8 to your computer and use it in GitHub Desktop.
Save dapperAuteur/9c29197d6f52603852a4665974521ae8 to your computer and use it in GitHub Desktop.
react with hooks
import React, { useReducer } from "react";
import * as actionTypes from "./actionTypes";
export const matchInitialState = {
currentUser: {},
endpoint: "localhost:4001",
// endpoint: "http://192.168.0.4:4001",
match: {
scoreKeeper: "",
homeTeam: "5c9a9ef3e6814f122a1af324",
awayTeam: "5c9a9e2be6814f122a1af322",
homeTeamScore: 0,
awayTeamScore: 0,
currentInning: 0,
innings: [
"Top 1st",
"Bottom 1st",
"Top 2nd",
"Bottom 2nd",
"Top 3rd",
"Bottom 3rd",
"Top 4th",
"Bottom 4th",
"Top 5th",
"Bottom 5th",
"Top 6th",
"Bottom 6th",
"MATCH OVER"
],
balls: 0,
strikes: 0,
fouls: 0,
outs: 0
},
matches: []
};
export const matchDefaultState = {
currentUser: {},
match: {
homeTeam: "5c9a9ef3e6814f122a1af324",
awayTeam: "5c9a9e2be6814f122a1af322"
},
matches: []
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment