React Server Components (RSC)
React Server Components (RSC)
are components rendered on the server. This has benefits which are explained well in the link.
This site is mostly rendered using RSC with a sprinkling of client components where there is user interaction. To do this we are using the latest
App Router
technology from
Next
.
The below example is the same WeatherDemo that is used in the
tRPC Complex Example page
. The only difference is this one is rendered on the server and the tRPC example is rendered on the client.
WeatherDemo
This example gets weather information from the
UK Met Office
for the last 24-hours.
The actual weather table component is used in both the RSC and tRPC examples. In each case the live data retrieved from the Met Office is passed to the Weather table component.
RSC Weather example
Name: Heathrow
Country: England
Continent: Europe
Longitude: -0.449
Latitude: 51.479
Elevation: 25.0m
Date@TimeWind GustTemp.VisibilityWind DirectionWind SpeedWeather TypePressurePressure TendencyDew PointScreen Relative Humidity
22/12@10:00
32
mph
5.4
C
55000
m
W
21
mph
Sunny day
1004
hpa
R
Pa/s
0.1
C
68.6
%
22/12@11:00
34
mph
5.6
C
75000
m
W
21
mph
Sunny day
1005
hpa
R
Pa/s
0.1
C
67.6
%
22/12@12:00
33
mph
5.9
C
75000
m
W
18
mph
Cloudy
1005
hpa
R
Pa/s
0.7
C
69.1
%
22/12@13:00
31
mph
6.7
C
60000
m
W
18
mph
Partly cloudy (day)
1005
hpa
R
Pa/s
-0.3
C
60.8
%
22/12@14:00
28
mph
6.7
C
50000
m
W
16
mph
Cloudy
1006
hpa
R
Pa/s
0.2
C
63.0
%
22/12@15:00
30
mph
5.8
C
5000
m
W
19
mph
Light rain
1007
hpa
R
Pa/s
2.1
C
77.0
%
22/12@16:00
40
mph
6.0
C
75000
m
WNW
17
mph
Overcast
1008
hpa
R
Pa/s
1.7
C
73.8
%
22/12@17:00
28
mph
5.9
C
40000
m
W
15
mph
Cloudy
1008
hpa
R
Pa/s
2.1
C
76.4
%
22/12@18:00
25
mph
6.7
C
30000
m
W
14
mph
Overcast
1009
hpa
R
Pa/s
1.2
C
67.6
%
22/12@19:00
36
mph
7.5
C
21000
m
WNW
18
mph
Overcast
1010
hpa
R
Pa/s
-0.1
C
58.2
%
22/12@20:00
36
mph
7.1
C
15000
m
WNW
22
mph
Overcast
1011
hpa
R
Pa/s
-0.1
C
60.0
%
22/12@21:00
37
mph
7.4
C
16000
m
WNW
19
mph
Overcast
1013
hpa
R
Pa/s
-0.8
C
55.6
%
22/12@22:00
34
mph
7.0
C
16000
m
WNW
18
mph
Overcast
1014
hpa
R
Pa/s
-0.8
C
57.3
%
22/12@23:00
31
mph
6.5
C
17000
m
WNW
18
mph
Overcast
1015
hpa
R
Pa/s
-0.4
C
61.0
%
23/12@00:00
31
mph
6.2
C
19000
m
WNW
18
mph
Partly cloudy (night)
1016
hpa
R
Pa/s
-0.5
C
61.8
%
23/12@01:00
29
mph
5.8
C
20000
m
WNW
15
mph
Cloudy
1017
hpa
R
Pa/s
-0.5
C
63.6
%
23/12@02:00
30
mph
5.4
C
20000
m
NW
14
mph
Clear night
1018
hpa
R
Pa/s
-0.4
C
65.8
%
23/12@03:00
28
mph
5.2
C
22000
m
WNW
11
mph
Clear night
1019
hpa
R
Pa/s
-0.8
C
64.7
%
23/12@04:00
16
mph
4.9
C
22000
m
WNW
8
mph
Clear night
1020
hpa
R
Pa/s
-1.1
C
64.7
%
23/12@05:00
18
mph
5.0
C
24000
m
WNW
11
mph
Clear night
1021
hpa
R
Pa/s
-1.6
C
61.7
%
23/12@06:00
18
mph
4.4
C
24000
m
WNW
9
mph
Clear night
1022
hpa
R
Pa/s
-1.7
C
64.0
%
23/12@07:00
17
mph
4.4
C
22000
m
WNW
10
mph
Clear night
1022
hpa
R
Pa/s
-1.2
C
66.4
%
23/12@08:00
15
mph
4.2
C
21000
m
WNW
7
mph
Clear night
1024
hpa
R
Pa/s
0.3
C
75.4
%
23/12@09:00
13
mph
4.1
C
23000
m
WNW
8
mph
Sunny day
1024
hpa
R
Pa/s
1.0
C
80.0
%
23/12@10:00
11
mph
5.5
C
26000
m
WNW
6
mph
Cloudy
1024
hpa
R
Pa/s
1.4
C
74.5
%

FUTORO