Server-Side Rendering & SEO

Server-Side Rendering (often abbreviated as "SSR") is an essential for SEO and to improve application load time.

Oreact SSR allows you to render your application to an HTML string that can be sent to the client.

As we have discussed in our Code Splitting article, It is not always necessary to use SSR. You can simply enable/disable SSR wherever you want.

SEO Support

Server-side rendering helps us to achieve SEO goals, Which is more important for SaaS(Software as a service) applications.

Document head tags management for search engines that support indexing of JavaScript content. (eg. Google)

Page Head

Oreact is using Helmet for page header management.

For Example

Oreact provides a PageHead component for embedding head tags.

import React from 'react';
import {PageHead} from '@oreact/core/client';

export default () => {    
    return <div>
                <PageHead>
                    <title>My Page Title</title>
                    <meta name="description" content="Page description" />
                </PageHead>
                ...
            </div>;
}