• Home
  • Resume
  • CV PDF
  • Portfolio
    • PHP Factory Pattern | PHP/OOP/Design Patterns
    • User validation form | PHP/OOP/HTML
    • Pizza Fanatic App | PHP/MySQL
    • Raspberry Pi Robot | RaspberryPi/Python
    • Commercial in Confidence | MySQL/PHP/AJAX
    • Gazetteer Geolocation | APIs/cURL/PHP/AJAX
    • Wasteman Clearance | Bootstrap/JS
    • Paddy Boyle Photos | Node.js
    • Paddy Boyle Photography | Node.js
    • Jackie Ceramics Site | Bootstrap
    • My Website | Node.js/Express/HBS
    • Phoenix Beading Site | Bootstrap
    • Neighbourhood Site | Bootstrap
    • GitHub Profiler API | AJAX/jQuery
    • AJAX CRUD Requests | AJAX/jQuery/Node.js
    • Geolocation App/API | AJAX/PHP/CURL/JSON
    • Json Generator App | AJAX
    • Musicon Site | Handlebars
    • Rock Paper Scissors App | JS
    • PHP Calculator App | PHP
    • Race Registration App | JS
    • Magic Eight Ball App | JS
    • Games of Chance App | JS
    • Tasty Treats Form | Node.js
    • React Exercise | Node.js/React
    • Bitesize API | AJAX
    • Wordsmith API | AJAX
    • Piano Keys App | jQuery
    • Gameboard App | jQuery
    • Web Safe Font App | jQuery
    • Feedster App | PHP
    • Madison Site | jQuery
    • Task List | Python/Flask
    • Trivia Card | jQuery
    • Academia Stats | DC.js/Crossfilter
    • Connect Four Game | jQuery
    • DRY App | Bootstrap
    • Silent Signs | JS/Bootstrap
    • Tic Tac Toe Game | JS
    • Stopwatch App | JS
    • CSS Poster | HTML5/CSS3
  • Git Hub
  • Contact
Jed Boyle logo

Jed Boyle

Full Stack Developer

Jed Boyle logo

Jed Boyle

Full Stack Developer

  • Home
  • Resume
  • CV PDF
  • Portfolio
  • GIT HUB
  • Contact
Jed Boyle logo

Jed Boyle

Full Stack Developer

  • Home
  • Resume
  • CV PDF
  • Portfolio
  • GIT HUB
  • Contact

React Exercise

React Exercise

https://jboyle1.github.io/react-sateless-comp-inherit-stateful-comp/
https://jboyle1.github.io/react-sateless-comp-inherit-stateful-comp/
Previous Next

Project Description


A stateful component class defines a function that calls this.setState. (App.js, lines 15-19)

The stateful component passes that function down to a stateless component. (App.js, line 24)

That stateless component class defines a function that calls the passed-down function, and that can take an event object as an argument. (Child.js, lines 10-13)

The stateless component class uses this new function as an event handler. (Child.js, line 20)

When an event is detected, the App’s state updates. (A user selects a new dropdown menu item)

The stateful component class passes down its state, distinct from the ability to change its state, to a different stateless component. (App.js, line 25)

That stateless component class receives the state and displays it. (Sibling.js, lines 5-10)

An instance of the stateful component class is rendered. One stateless child component displays the state, and a different stateless child component displays a way to change the state. (App.js, lines 23-26)

Click here for GitHub repository



Project Description


A stateful component class defines a function that calls this.setState. (App.js, lines 15-19)

The stateful component passes that function down to a stateless component. (App.js, line 24)

That stateless component class defines a function that calls the passed-down function, and that can take an event object as an argument. (Child.js, lines 10-13)

The stateless component class uses this new function as an event handler. (Child.js, line 20)

When an event is detected, the App’s state updates. (A user selects a new dropdown menu item)

The stateful component class passes down its state, distinct from the ability to change its state, to a different stateless component. (App.js, line 25)

That stateless component class receives the state and displays it. (Sibling.js, lines 5-10)

An instance of the stateful component class is rendered. One stateless child component displays the state, and a different stateless child component displays a way to change the state. (App.js, lines 23-26)

Click here for GitHub repository



My Social