Lesson - 3 - Introduction To React
Lesson - 3 - Introduction To React
1
OBJECTIVES
2
OVERVIEW FRONT-
END JAVASCRIPT
FRAMEWORKS
AND LIBRARIES 3
LIBRARY VS FRAMEWORK
◆ The following borrowed from AngularJS documentation makes the distinction clear:
◆ a library - a collection of functions which are useful when writing web apps. Your
code is in charge and it calls into the library when it sees fit. E.g., jQuery.
◆ frameworks - a particular implementation of a web application, where your code fills
in the details. The framework is in charge and it calls into your code when it needs
something app specific. E.g., Angular, Ember, etc.
◆ https://docs.angularjs.org/guide/introduction
8/15/21 4
JAVASCRIPT FRAMEWORKS
8/15/21 5
JAVASCRIPT FRAMEWORKS/LIBRARIES
◆ Angular ◆ Meteor
◆ Ember ◆ Polymer
◆ Backbone
◆ Knockout
◆ React
◆ Vue
◆ Aurelia
◆ Mercury
8/15/21 6
DON’T OVERREACT
8/15/21 7
INTRODUCTION
TO REACT 8
WHAT IS REACT?
8/15/21 9
REACT HISTORY
◆ React
https://en.wikipedia.org/wiki/React_(JavaScript_library)
8/15/21 10
REACT VOCABULARY
8/15/21 11
EXERCISE 5: GETTING STARTED WITH REACT
◆ Install create-react-app
◆ Scaffold out a basic React application
8/15/21 12
REACT
APPLICATION
OVERVIEW 13
REACT ELEMENT
8/15/21 14
RENDERING TO THE DOM
• <div id="root"></div>
8/15/21 15
INTRODUCTION
TO JSX 16
INTRODUCTION TO JSX
8/15/21 17
JSX
8/15/21 18
JSX
8/15/21 19
EMBEDDING EXPRESSIONS IN JSX
return (
<div key={dish.id} className="col-12 mt-5">
<Media tag="li">
<Media body className="ml-5">
<Media heading>{dish.name}</Media>
</Media>
</Media>
</div>
8/15/21 20
);
SUMMARY
8/15/21 21