React - Golf Scorer
This demo contains shows the use of nested React components to make a golf score calculator.
- The inner component contains a table with the hole details and score which can be incremented or decremented from the default par value.
- The outer component instantiates 9 of the inner components to give the scorecard for the outward 9 holes on the Carrickstone at Dullatur golf club.
- The score ranges from 0 to a maximum of 16 strokes.
The component should appear below, and does in development mode on the localhost but doesn't yet on the site - the next piece of the puzzle to figure out.
The code can be viewed in Plunker.
This was an early attempt at using React using hard-coded values for the sake of simplicity.