Skip to content
No description, website, or topics provided.
JavaScript CSS HTML
Branch: master
Clone or download
CN105 CN105
CN105 and CN105 first draft of README
Latest commit e71b634 Sep 24, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
public Initial commit from Create React App Sep 10, 2019
README-Intro_to_app.txt first draft of README Sep 24, 2019
package-lock.json adjusted css Sep 11, 2019

This is the first React app created by the author, Tom Ormiston

This has been deployed on GitHub

To install locally from this repo ensure Node.js is installed; the version I used was

$ node --version v610.6.3

And npm is up-to-date; the version I used was

$ npm --version 6.9.0

To start $npm start

This is a basic explanation using one example

digitHandler = (param) => {
    console.log(`digitHandler --> ${param}`)
    -  set the state

is passed into --->

<Digits theHandler={this.digitHandler}/>

Hence when a button (lets say digit '4') is pressed ie 'onClick' ----->

        const Digits = (props) => {
            <div className="digits but" onClick = {() => props.theHandler('4')}>4</div>

so onClick it passes via an anaonymous function '4' to the digitHandler since (for digits) 'theHandler" is 'digitHandler'

There are many areas where this app could be improved upon.

From creating an array of keys and applying the mapping function to produce the button functionality, to simplifying the CSS.

However as a first attempt I was reasonably happy with the outcome.

You can’t perform that action at this time.