Two Forms of Pre-rendering

2024-08-03

Tiempo de lectura: 2 minutos

Next.js has two forms of pre-rendering: Static Generation and Server-side Rendering. The difference is in when it generates the HTML for a page.

Importantly, Next.js lets you choose which pre-rendering form to use for each page. You can create a "hybrid" Next.js app by using Static Generation for most pages and using Server-side Rendering for others.

For example, you should understand code like this:

js
1const basics = 'Okay, that should not be too difficult actually';
2
3function printBasics() {
4  console.log(basics):
5}
6
7printBasics();

Learn more about it here .

python
1# Colocar las casas en el mapa:
2for i in range(len(dataset)):
3    if dataset['ocean_proximity'].iloc[i]=='INLAND':
4        folium.Circle(location=(dataset['latitude'].iloc[i], dataset['longitude'].iloc[i]),
5                  radius=dataset['population'].iloc[i]/2,
6                  stroke=False,
7                 fill_color='red',
8                 fill_opacity=0.3,
9                  ).add_to(map_California)
10    if dataset['ocean_proximity'].iloc[i]=='NEAR BAY':
11            folium.Circle(location=(dataset['latitude'].iloc[i], dataset['longitude'].iloc[i]),
12                    radius=dataset['population'].iloc[i]/2,
13                    stroke=False,
14                    fill_color='blue',
15                    fill_opacity=0.3,
16                    ).add_to(map_California)
17    if dataset['ocean_proximity'].iloc[i]=='NEAR OCEAN':
18            folium.Circle(location=(dataset['latitude'].iloc[i], dataset['longitude'].iloc[i]),
19                    radius=dataset['population'].iloc[i]/2,
20                    stroke=False,
21                    fill_color='purple',
22                    fill_opacity=0.3,
23                    ).add_to(map_California)

Cómo crear un div con fondo azul y borde rojo

En este tutorial, aprenderás cómo crear un div con un fondo azul y un borde rojo de 2px. Este es el código que necesitas:

html
1<div style="background-color: blue; border: 2px solid red; padding: 1rem; color: white;">
2  Esto es un ejemplo de div con fondo azul y borde rojo.
3</div>