forked from cis3296f23/Exploring-National-Parks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParkPlanSequence.txt
50 lines (40 loc) · 1.43 KB
/
ParkPlanSequence.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
title Park Plan Sequence
actor User
participant HTML
participant ReactComponent/JS
participant NPSAPI ("backend")
activate User
activate HTML
User ->HTML:HTTP Request
User <-- HTML: HTTP Response
HTML ->ReactComponent/JS:Loads
activate ReactComponent/JS
ReactComponent/JS ->ReactComponent/JS :useEffect()
ReactComponent/JS ->NPSAPI ("backend"): asynchronous fetch()
activate NPSAPI ("backend")
ReactComponent/JS <--NPSAPI ("backend"):json of parks
deactivate NPSAPI ("backend")
ReactComponent/JS ->ReactComponent/JS :useEffect()
ReactComponent/JS ->NPSAPI ("backend"): asynchronous fetch()
activate NPSAPI ("backend")
ReactComponent/JS <--NPSAPI ("backend"):json of activities
deactivate NPSAPI ("backend")
ReactComponent/JS --> HTML: Update State
deactivate ReactComponent/JS
User -> HTML : uses select tag\n to choose park
User <-- HTML : Display Result
User -> HTML : uses select tag\nto choose activities
User <-- HTML : Display Result
User -> HTML : uses calendar input\n to choose dates
User <-- HTML : Display Result
User -> HTML: Clicks "plan trip"\nbutton
HTML ->ReactComponent/JS: Loads
activate ReactComponent/JS
ReactComponent/JS ->ReactComponent/JS :useEffect()
ReactComponent/JS ->NPSAPI ("backend"): asynchronous fetch()
activate NPSAPI ("backend")
ReactComponent/JS <--NPSAPI ("backend"):json of alerts
deactivate NPSAPI ("backend")
HTML <--ReactComponent/JS : Update State
deactivate ReactComponent/JS
User <--HTML: Display Result