Story

Remix: A FullStack Framework of React Overview
Remix: A FullStack Framework of React OverviewBy Joy kumar

Posts

Difference between Remix and React || Why need of Remix When we Have a React

Getting started with Remix || Create a project with Remix

Handling Routing in remix and upgrading to v2 || Remix Navigation

Built-In components in Remix

Mastering Remix Hooks: Simplify Data Fetching and Actions

How WordPress Delivers SEO-Friendly Static Pages Without Modern SSR

Server side Rendering (ssr) in Remix

Difference between Remix and React || Why need of Remix When we Have a React

Difference between Remix and React || Why need of Remix When we Have a React

As we know React is a Fantastic  Frame work, But some features that might not available on react we discuss about that and last we make projects in Remix and understand the fundamentals of it.

Features:

  1. SEO: React have not that features of optimizing the webpage in seo friendly, so we use remix instead of react as remix is a fullstack framework and it also offers some seo features like Meta Tags, Links tag and also we used these tags as dynamic tags.

    export function meta() {
      return {
        title: "My Page Title",
        description: "A short description of the page",
      };
    }
    
  2. SSR: Remix offers to fetch data in sever instead of client side. The main focus, when we use client side rendering the page is fetched when initial content loaded then it fetches data and the google bot crawled the page when it loaded so the dynamic content it not be crawled. The Remix solve these issue by fetching the data in server side by default by use of loader function and we use these data in client using useLoader data and we have also others features of default Form component for send and receiving data from server using SSR.

    import { json } from "@remix-run/node"
    
    export const loader = async () => {
      return json({ ok: true });
    };
    
    export default function Users() {
      const data = useLoaderData<typeof loader>();
      return (
        <ul>
          {data.map((user) => (
            <li key={user.id}>{user.name}</li>
          ))}
        </ul>
      );
    }
  3. Performance optimization: In order to use optimization in react the developers use Lazy loading, code Splitting, Caching, But in remix its default features no need to doing this its helps to faster loading and decrease the loading time.

  4. Navigation: In react we use third party library like react-router but in Remix as a fullstack framework react-router is default and additional it supports file based routing and its developer friendly and very easy to use and implement.

     app/
    ├── routes/
    │   ├── _index.jsx
    │   ├── about.jsx
    │   ├── concerts.trending.jsx
    │   ├── concerts.$city.jsx
    │   └── concerts.san-diego.jsx
    └── root.tsx

    URLMatched Route
    /app/routes/_index.jsx, Home page
    /aboutapp/routes/about.jsx
    /concerts/trendingapp/routes/concerts.trending.jsx
    /concerts/salt-lake-cityapp/routes/concerts/salt-lake-city.jsx, Dynamic route
    /concerts/san-diegoapp/routes/concerts.san-diego.jsx

     

  5. FullStack Framework: Remix is a fullstack framework and react only frontend library that makes remix a advantage of being frontend and backend togther, With the fullstack capabilaties it offers various features and its built on react so the learning curve becomes zero. A full-stack framework built on React, providing end-to-end solutions, including routing, data fetching, SSR, and performance optimizations, all out of the box.