MQ
QURASHI
Blog
MQ
MOHAMED QURASHI

© 2026 Mohamed Qurashi. All rights reserved.

Built with precisionDesigned for impactPowered by innovation
MQ
QURASHI
Blog
Back to Blog
Web Development

Beyin Incident: Two Days Lost

Mohamed Qurashi
April 8, 2026
7 min read
Beyin Incident: Two Days Lost

Share

TwitterFacebookLinkedIn

Tags

Next.jsRemixBeyin IncidentDowntime

Last month, I ran into a problem that cost us two days at Beyin. Here's what happened and how we fixed it.


---


Why This Matters (and Why I Care)


**The Basics You Actually Need**


As a developer, your skillset is constantly evolving to stay ahead of the competition. React frameworks such as Next.js and Remix are two of the most popular choices for building modern web applications. Both offer unique features that cater to different project needs and preferences.


In 2025, both Next.js and Remix have undergone significant updates and improvements, making them even more relevant in the competitive landscape of web development.


**The Basics You Actually Need**


  • **Next.js vs Remix: A Comparison Overview**
  • - Next.js is a popular framework for building server-side rendered (SSR) applications. It’s known for its fast rendering capabilities and easy-to-use API, making it great for complex frontend projects.

    - Remix, on the other hand, is built with React and works in modern browsers using web components. It has a simpler architecture but provides more flexibility.


  • **Next.js vs Remix: Performance Differences**
  • - Next.js excels in performance due to its SSR capabilities, which can significantly improve load times for mobile devices.

    - Remix focuses on JavaScript-first development, ensuring optimal rendering and performance regardless of the device.


  • **Next.js vs Remix: User Experience (UX) Considerations**
  • - Next.js offers a more modern user experience with its features like GraphQL for dynamic data fetching and better integration with other services.

    - Remix is generally praised for its simpler architecture, which can be easier to understand and maintain, especially for smaller teams.


  • **Next.js vs Remix: Compatibility with Web Components**
  • - Both frameworks have excellent compatibility with web components, making them easy to integrate into existing projects.


    **How I Build With It (Step by Step)**


    #### **Building a Next.js Application**


    Let's start with a basic example of using Next.js for a simple blog application. This project will demonstrate how we structure our code and handle routing.


    // Import necessary packages

    import React from 'react';

    import { Link } from 'next/link';


    // Define the BlogPost component

    const BlogPost = ({ post }) => {

    return (

    <div>

    <h1>{post.title}</h1>

    <p>{post.content}</p>

    <Link href={`/posts/${post.id}`}>Read more</Link>

    </div>

    );

    };


    // Define the BlogList component

    const BlogList = ({ posts }) => {

    return (

    <ul className="list">

    {posts.map((post) => (

    <li key={post.id}>

    <BlogPost post={post} />

    </li>

    ))}

    </ul>

    );

    };


    // Define the Layout component for our Next.js blog

    const BlogLayout = ({ children }) => {

    return (

    <div className="blog-layout">

    {children}

    </div>

    );

    };


    // Create a custom API route using Next.js' dynamic imports and server-side rendering

    export default async function Home({ query: { id } }) {

    const response = await fetch(`/api/blog/${id}`);

    const postData = await response.json();

    return (

    <BlogLayout>

    <BlogList posts={postData.posts} />

    </BlogLayout>

    );

    }


    // Define a custom route using Next.js' Link component

    export default function BlogPostPage({ params: { id } }) {

    return (

    <div className="blog-post">

    <BlogLayout>

    <BlogPost post={{ id, title: 'Sample Title', content: 'This is the sample blog post.' }} />

    </BlogLayout>

    </div>

    );

    }


    // The API route for fetching blog posts

    export default function getStaticProps(context) {

    const response = fetch('/api/blog');

    return {

    props: { posts: response.json() },

    };

    }


    #### **Building a Remix Application**


    Now let's look at how we can create an equivalent application using Remix.


    // Import necessary packages and setup Remix project

    import type { ActionArgs } from '@remix-run/node';

    import type { PostData, PostsResponse, UserResponse } from '~/utils';


    const App = ({ userId }: { userId: string }) => {

    return (

    <div>

    {/* Render a blog post */}

    </div>

    );

    };


    export default function Home() {

    const [posts, setPosts] = React.useState<PostsResponse>();


    React.useEffect(() => {

    const fetchData = async () => {

    const response = await fetch('/api/blog');

    const data: PostsResponse = await response.json();

    setPosts(data);

    };


    fetchData();


    return () => {};

    }, []);


    if (!posts) return <div>Loading...</div>;


    // Render the blog posts

    }


    export default function BlogPostPage({ params }: { params: { id: string } }) {

    const [post, setPost] = React.useState<PostData>();


    React.useEffect(() => {

    const fetchData = async () => {

    const response = await fetch(`/api/blog/${params.id}`);

    const data: PostData = await response.json();

    setPost(data);

    };


    fetchData();


    return () => {};

    }, []);


    if (!post) return <div>Loading...</div>;


    // Render the blog post

    }


    #### **Mistakes I Made (So You Don't Have To)**


    When implementing Remix in production, we encountered several challenges. One common mistake was using the same `import` statements across multiple files, leading to unnecessary imports and potential performance issues.


    Another issue was integrating React hooks within JavaScript classes, which is not recommended as it breaks type safety and can lead to unexpected behavior.


    **Advanced Tips From Production**


  • Always ensure you're using TypeScript with strict mode enabled.
  • Make sure your project's dependencies are up-to-date for the latest features and bug fixes.
  • Regularly run Linting tools like ESLint or Prettier to maintain consistent code quality.
  • Consider setting up a continuous integration/continuous deployment (CI/CD) pipeline, such as Jenkins or Circle CI.

  • **My Honest Take**


    In 2025, Next.js and Remix are still the go-to options for building robust web applications. While Next.js has been around longer and is more established in the community, Remix's simpler architecture can be a better fit for smaller teams looking for an easier learning curve.


    Both frameworks have their strengths and weaknesses, so it's crucial to tailor your choice based on the specific needs of your project and team's capabilities.


    ---


    **Conclusion**


    Next.js vs Remix: Which One Should You Choose is a critical decision that impacts both performance and user experience. Understanding these differences can help you choose the right framework for your next web application project, ensuring it meets your objectives and exceeds expectations.


    If you're in the market for development tools or have questions about Next.js or Remix, feel free to reach out to me at [Mohamed Qurashi | Full-Stack Developer at Beyin Digital](https://qurashi.dev).


    ---

    **Further reading:**

  • [Next.js vs Remix in 2025: Which One Should You Choose? — Dev.to](https://dev.to/search?q=Next.js%20vs%20Remix%20in%202025%3A%20Which%20One%20Should%20You%20Choose%3F)
  • [Next.js vs Remix in 2025: Which One Should You Choose? — web.dev](https://web.dev/search/?q=Next.js%20vs%20Remix%20in%202025%3A%20Which%20One%20Should%20You%20Choose%3F)

  • **Related articles on this blog:**

  • [nextjs vs remix](/blog/nextjs-vs-remix)

  • Related Articles

    Next.js 15 Complete Guide: App Router & Server Components
    Web Development

    Next.js 15 Complete Guide: App Router & Server Components

    A practical, production-tested guide to Next.js 15 App Router and Server Components. Learn how to cut JavaScript bundles by 40% with real patterns from Beyin Digital.

    App vs Web in Next.js: Why I Finally Switched After 5 Years
    Web Development

    App vs Web in Next.js: Why I Finally Switched After 5 Years

    Discover the real differences between App Router and Pages Router in Next.js. Learn when to use each based on production experience from an SEO specialist in Dubai.