Documentation Index Fetch the complete documentation index at: https://blog.mapptech.com.co/llms.txt
Use this file to discover all available pages before exploring further.
Multi-Page Applications (MPA)
MPAs reload the page on every navigation.
Pros:
Simple architecture.
Full HTML is delivered on first load.
When pages are mostly static, they can be effectively cached and delivered by a CDN.
Cons:
Navigation is slower due to full page reloads.
Dynamic updates require complete page refreshes.
Single-Page Applications (SPA)
SPAs load content dynamically on the client. This means the initial HTML is essentially empty.
Diagram
React Diagram
Code
tutorial-code.jsx
actual-code.jsx
react-query.jsx
function App () {
const [ data , setData ] = React . useState ( null );
const [ query , setQuery ] = React . useState ( "default" );
const [ input , setInput ] = React . useState ( "default" );
const [ loading , setLoading ] = React . useState ( true );
React . useEffect (() => {
setLoading ( true );
fetch (
`https://api.example.com/data?query= ${ encodeURIComponent ( query ) } `
)
. then (( response ) => response . json ())
. then (( result ) => {
setData ( result );
setLoading ( false );
})
. catch (( error ) => {
console . error ( error );
setLoading ( false );
});
}, [ query ]);
const handleSubmit = ( e ) => {
e . preventDefault ();
setQuery ( input );
};
return (
< div >
< h1 > Data Fetch Tutorial </ h1 >
< form onSubmit = { handleSubmit } >
< input
value = { input }
onChange = { ( e ) => setInput ( e . target . value ) }
placeholder = "Enter query"
/>
< button type = "submit" > Search </ button >
</ form >
{ loading ? (
< p > Loading data... </ p >
) : (
< pre > { JSON . stringify ( data , null , 2 ) } </ pre >
) }
</ div >
);
}
Pros:
Fast in-page navigation.
Dynamic interactivity.
Cons:
Minimal initial HTML.
Heavy reliance on client-side JavaScript.
SPA-influenced Isomorphic
Initial HTML is rendered on the server for SEO and fast first paint, then hydrated on the client to enable interactivity.
Diagram
React Diagram
Code
page.jsx
loading.jsx
error.jsx
MutationManager.jsx
export const metadata = {
title: "SPA-influenced Isomorphic Rendering Example" ,
description: "An isomorphic rendering example with SEO metadata." ,
keywords: "rendering, isomorphic, react, SEO, server components" ,
};
// Assume MutationManager is dynamically imported for client-side behavior.
export default async function Page ({ searchParams }) {
const query = searchParams . query || "default" ;
const res = await fetch (
`https://api.example.com/data?query= ${ encodeURIComponent ( query ) } ` ,
{ cache: "force-cache" }
);
const data = await res . json ();
return (
< div >
< h1 > Isomorphic Page - Results for: { query } </ h1 >
< pre > { JSON . stringify ( data , null , 2 ) } </ pre >
< MutationManager />
</ div >
);
}
Pros:
SEO-friendly full HTML is delivered initially.
Cons:
Requires coordination between client and server.
More complex setup.
MPA-influenced Split Execution
Mostly/Fully HTML rendered on the server using server actions.
Diagram
React Diagram
Code
page.jsx
loading.jsx
error.jsx
export const metadata = {
title: "Server-Rendered Page with Actions" ,
description:
"A server-rendered page that handles mutations using server actions and revalidates paths." ,
keywords: "rendering, server actions, Next.js, MPA" ,
};
export default async function Page ({ searchParams }) {
const query = searchParams . query || "default" ;
const res = await fetch (
`https://api.example.com/data?query= ${ encodeURIComponent ( query ) } ` ,
{ cache: "force-cache" }
);
const data = await res . json ();
async function handleMutation ( formData ) {
"use server" ;
const res = await fetch ( "https://api.example.com/update" , {
method: "POST" ,
body: formData ,
});
revalidatePath ( "/" );
}
return (
< div >
< h1 > Server-Rendered Page with Actions </ h1 >
< pre > { JSON . stringify ( data , null , 2 ) } </ pre >
< ErrorBoundary fallback = { < p > Error updating data. </ p > } >
< Suspense fallback = { < p > Updating... </ p > } > |
< form action = { handleMutation } >
< input name = "value" type = "text" />
< button type = "submit" > Submit </ button >
</ form >
</ Suspense >
</ ErrorBoundary >
</ div >
);
}
Pros:
CDN-friendly HTML delivery.
Minimal client-side code.
Excellent SEO.
Cons:
Client-side interactivity may require additional handling.
Increased server CPU consumption.
๐ Rendering Strategy Comparison
Property MPA SPA SPA Isomorphic MPA Split Execution SEO Friendly โ
โ โ
โ
Fast Navigation โ โ
โ
โ
Interactive Experience โ โ
โ
โ
CDN Friendly โ
โ โ
โ
Simple Architecture โ
โ โ โ
Lightweight Client JS โ
โ โ
โ
Low CPU Usage โ โ
โ
โ Low Server Costs โ โ
โ โ
๐ Live Example: NextFaster
To see these rendering strategies in action, check out NextFaster โ a real-world project that blends server components, React islands, and split execution for optimal performance and SEO.
What makes NextFaster interesting?
โ๏ธ React Server Components with minimal client-side JS
๐ Server Actions and Edge revalidation
๐ธ Exceptionally low hosting cost while high performance
๐ Excellent SEO and performance balance
Ideal for studying modern rendering techniques in Next.js 14+ with App Router.
๐บ Recommended Videos
Comparing Data Fetching Strategies
Data Loading in Next.js 15
Why Server Components Matter
๐ Further Reading
๐ง Final Thoughts
Each rendering strategy has its strengths. MPAs are straightforward and, when mostly static, can be effectively cached via a CDN; SPAs deliver dynamic interactivity entirely on the client (resulting in minimal initial HTML); SPA-influenced Isomorphic approaches combine SEO and dynamic updates by server-rendering the initial HTML and hydrating on the client; and MPA influenced Split Execution offers performance with server-handled mutations using server actions.