React
1
javacream.org
React
please introduce yourself
2
javacream.org
React
Initial situation
3
javacream.org
React
client-server programming
4
Web Server
http/https
Web Browser
Take it for granted in the seminar
Relevant for the seminar
javacream.org
React
Evaluation of browser technologies from the perspective of application development
5
javacream.org
React
Solutions to these problems
6
javacream.org
React
Evaluation of browser technologies from the perspective of application development
7
npm + WebPack delivers modularization
SCSS is transpiled to CSS
TypeScript / ES is transpiled to JavaScript
javacream.org
React
Solution to the last problem
8
javacream.org
React
React
9
javacream.org
React
Choice of programming language
10
javacream.org
React
First Contact
11
javacream.org
React
Installation
# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# download and install Node.js (you may need to restart the terminal)
nvm install 22
# verifies the right Node.js version is in the environment
node -v # should print `v22.12.0`
# verifies the right npm version is in the environment
npm -v # should print `10.9.0`
12
javacream.org
React
A first React project
13
javacream.org
React
Overview of the generated project
14
javacream.org
React
ToDo
15
javacream.org
React
Programming model in the App.js
16
javacream.org
React
React and HTML
17
javacream.org
React
ToDo: A first user interface
18
App (as before)
PeopleApp (new React Component)
Header ((new React Component))
PEOPLE
Content ((new React Component))
empty
Footer ((new React Component))
Javacream
javacream.org
React
Optional ToDo: A first surface, some design
19
App (as before)
PeopleApp (new React component)
Header ((new React Component))
PEOPLE
Content ((new React Component))
empty
Footer ((new React Component))
Javacream
javacream.org
React
ToDo
20
javacream.org
React
ToDo
21
App (as before)
PeopleApp (new React component)
Header (React Component)
PEOPLE
Content (React Component)
Footer ()
Javacream
model
Person
PeopleModel
PeopleContext
John Doe
javacream.org
React
UI update in React
22
javacream.org
React
General remark
23
javacream.org
React
React and updating
24
javacream.org
React
New component
25
State
Load name: <lastname>
javacream.org
React
ToDo
26
Component
Child component
props
event
javacream.org
React
introduce routing
27
javacream.org
React
PeopleList revisited
28
javacream.org
React
Introduction to the reactive style
29
Data source
subscribe
notification with the changes
Classic observer pattern
Messaging
Event-driven approach
Data source
Pipeline
javacream.org
React
Application design
30
Component 1
Component 2
Component 3
Whiteboard / Blackboard
Subject A
Subject B
Application Model
javacream.org
React
ToDo: In our application
31
javacream.org
React
Very popular implementation of Reactive
32
javacream.org
React
Navigation
33
javacream.org
React
Page navigation in React is optional(?)
34
javacream.org
React
ToDo
35
javacream.org
React
Redux
36
javacream.org
React
Motivation
37
javacream.org
React
Application design
38
Component 1
Component 2
Component 3
Store
State A
State B
Reducer functions
(oldState, payload)=>newState=...
Action Builder
Dispatcher
Name of the action identifies the reducer to be called
javacream.org
React
History
39
javacream.org
React
Current status
40
+
-
Meter reading: 42
javacream.org
React
Asynchronous programming
41
javacream.org
React
Several possibilities
42
not so: that would be a blocking action!
javacream.org
React
React and TypeScript
43
javacream.org
React
React and Typescript
44
javacream.org
React