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
23/12@01:00
8
mph
8.6
C
9000
m
NE
5
mph
Mist
1012
hpa
R
Pa/s
7.9
C
95.3
%
23/12@02:00
11
mph
8.6
C
8000
m
NE
6
mph
Mist
1012
hpa
R
Pa/s
7.8
C
94.6
%
23/12@03:00
16
mph
8.6
C
7000
m
ENE
8
mph
Mist
1013
hpa
R
Pa/s
7.1
C
90.2
%
23/12@04:00
15
mph
8.4
C
7000
m
ENE
9
mph
Mist
1013
hpa
R
Pa/s
6.6
C
88.3
%
23/12@05:00
19
mph
7.9
C
7000
m
ENE
9
mph
Mist
1013
hpa
R
Pa/s
5.7
C
85.8
%
23/12@06:00
18
mph
7.5
C
6000
m
ENE
10
mph
Mist
1014
hpa
R
Pa/s
5.3
C
85.7
%
23/12@07:00
17
mph
7.4
C
7000
m
ENE
9
mph
Mist
1014
hpa
R
Pa/s
5.0
C
84.6
%
23/12@08:00
18
mph
7.3
C
12000
m
NE
11
mph
Overcast
1015
hpa
R
Pa/s
4.3
C
81.0
%
23/12@09:00
19
mph
7.3
C
16000
m
NE
11
mph
Overcast
1016
hpa
R
Pa/s
3.7
C
77.7
%
23/12@10:00
24
mph
7.2
C
14000
m
ENE
10
mph
Overcast
1017
hpa
R
Pa/s
3.6
C
77.7
%
23/12@11:00
19
mph
7.3
C
11000
m
NE
11
mph
Overcast
1017
hpa
R
Pa/s
4.1
C
80.0
%
23/12@12:00
21
mph
7.5
C
10000
m
NE
10
mph
Overcast
1017
hpa
R
Pa/s
4.5
C
81.1
%
23/12@13:00
22
mph
7.6
C
14000
m
NE
9
mph
Overcast
1018
hpa
R
Pa/s
4.0
C
77.7
%
23/12@14:00
21
mph
7.7
C
15000
m
NE
13
mph
Overcast
1018
hpa
R
Pa/s
3.9
C
76.6
%
23/12@15:00
19
mph
7.4
C
14000
m
NNE
11
mph
Overcast
1018
hpa
R
Pa/s
4.0
C
78.8
%
23/12@16:00
21
mph
7.1
C
14000
m
NE
11
mph
Overcast
1019
hpa
R
Pa/s
3.7
C
78.8
%
23/12@17:00
23
mph
6.6
C
15000
m
NE
13
mph
Overcast
1020
hpa
R
Pa/s
3.4
C
79.8
%
23/12@18:00
28
mph
6.3
C
17000
m
NE
13
mph
Overcast
1021
hpa
R
Pa/s
2.9
C
78.6
%
23/12@19:00
28
mph
6.3
C
15000
m
NE
14
mph
Overcast
1022
hpa
R
Pa/s
2.7
C
77.4
%
23/12@20:00
24
mph
6.2
C
14000
m
NE
11
mph
Overcast
1023
hpa
R
Pa/s
2.7
C
78.1
%
23/12@21:00
29
mph
6.3
C
15000
m
NE
11
mph
Overcast
1023
hpa
R
Pa/s
2.6
C
76.9
%
23/12@22:00
25
mph
6.2
C
16000
m
NE
14
mph
Overcast
1024
hpa
R
Pa/s
2.5
C
76.9
%
23/12@23:00
26
mph
6.3
C
18000
m
NE
14
mph
Overcast
1025
hpa
R
Pa/s
2.4
C
75.7
%
24/12@00:00
30
mph
6.3
C
15000
m
NE
14
mph
Overcast
1025
hpa
R
Pa/s
2.7
C
77.4
%

FUTORO