<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mikhail Yarmaliuk</title>
    <description>The latest articles on DEV Community by Mikhail Yarmaliuk (@mikhail-yarmaliuk).</description>
    <link>https://dev.to/mikhail-yarmaliuk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1132204%2F6fb7e4e3-3153-4a28-91e9-dddf58c58da2.jpeg</url>
      <title>DEV Community: Mikhail Yarmaliuk</title>
      <link>https://dev.to/mikhail-yarmaliuk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mikhail-yarmaliuk"/>
    <language>en</language>
    <item>
      <title>Creating Mobx Stores Manager: A Fresh Perspective</title>
      <dc:creator>Mikhail Yarmaliuk</dc:creator>
      <pubDate>Fri, 04 Aug 2023 10:42:29 +0000</pubDate>
      <link>https://dev.to/lomray-software/creating-mobx-stores-manager-a-fresh-perspective-2jb6</link>
      <guid>https://dev.to/lomray-software/creating-mobx-stores-manager-a-fresh-perspective-2jb6</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flc9ck4xgaaa2clqg3ctc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flc9ck4xgaaa2clqg3ctc.png" alt="Mobx store manager logo" width="300" height="303"&gt;&lt;/a&gt;&lt;br&gt;Manage your Mobx stores like a boss — debug like a hacker.
  &lt;br&gt;
&lt;/p&gt;




&lt;p&gt;Hello there!👋 I'm Mikhail, the Chief Technology Officer👮‍♀️ at Lomray Software. Today, I'm excited to share our decision in mobx for managing stores.&lt;/p&gt;

&lt;p&gt;In a sea🌊 of existing solutions, you might be wondering if there's room for one more. Allow me to assure you — this isn't just another rehash of the same old state tree concept. While established approaches certainly have their merits, I propose an alternative. As the saying goes, "two heads are better than one" and in that spirit, I present to you an innovative perspective that I believe everyone should consider.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A New Take on State Management:&lt;/strong&gt;&lt;br&gt;
If you're anything like me, you've grown somewhat weary of the conventional state tree🌲 models. Whether it's the state tree of Redux or the Mobx approach, it's hard to escape their omnipresence, even in basic Google searches. Seeking something both novel and familiar, I embarked on a journey🔍 to reimagine the paradigm, particularly after transitioning from Redux to Mobx not long ago.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { combineReducers } from 'redux';
import AppInfoReducer from '@store/modules/app-info/reducer';
import FormApplicationReducer from '@store/modules/form-application/reducer';
import FormPopupReducer from '@store/modules/form-popup/reducer';
import FormQuizReducer from '@store/modules/form-quiz/reducer';
import FormSubscribeReducer from '@store/modules/form-subscribe/reducer';
import PageMetaReducer from '@store/modules/page-meta/reducer';
import BlogDetailsReducer from '@store/modules/pages/blog-details/reducer';
import BlogInfoReducer from '@store/modules/pages/blog/info/reducer';
import BlogListReducer from '@store/modules/pages/blog/list/reducer';
import BlogTagsReducer from '@store/modules/pages/blog/tags/reducer';
import Think3DetailsReducer from '@store/modules/pages/think3-details/reducer';
import Think3CitiesReducer from '@store/modules/pages/think3/cities/reducer';
import Think3InfoReducer from '@store/modules/pages/think3/info/reducer';
import Think3ListReducer from '@store/modules/pages/think3/list/reducer';
import Think3TagsReducer from '@store/modules/pages/think3/tags/reducer';
import Think1DetailsReducer from '@store/modules/pages/think1-details/reducer';
import Think1InfoReducer from '@store/modules/pages/think1/info/reducer';
import Think1ListReducer from '@store/modules/pages/think1/list/reducer';
import Think1TagsReducer from '@store/modules/pages/think1/tags/reducer';
import ContactPageReducer from '@store/modules/pages/contact/reducer';
import HomeGraphReducer from '@store/modules/pages/home/graph/reducer';
import HomePageReducer from '@store/modules/pages/home/info/reducer';
import Think2DetailsReducer from '@store/modules/pages/think2-details/reducer';
import Think2InfoReducer from '@store/modules/pages/think2/info/reducer';
import Think2ListReducer from '@store/modules/pages/think2/list/reducer';
import Think2TagsReducer from '@store/modules/pages/think2/tags/reducer';
import OurTeamPageReducer from '@store/modules/pages/our-team/reducer';
import PrivacyPolicyReducer from '@store/modules/pages/privacy-policy/reducer';
import SearchReducer from '@store/modules/pages/search/reducer';
import FormCvReducer from '@store/modules/post-cv/reducer';

const reducers = {
  pages: combineReducers({
    home: combineReducers({
      info: HomePageReducer,
      graph: HomeGraphReducer,
    }),
    think1: combineReducers({
      info: Think1InfoReducer,
      list: Think1ListReducer,
      tags: Think1TagsReducer,
    }),
    think1Details: Think1DetailsReducer,
    think2: combineReducers({
      info: Think2InfoReducer,
      list: Think2ListReducer,
      tags: Think2TagsReducer,
    }),
    think2Details: Think2DetailsReducer,
    ourTeam: OurTeamPageReducer,
    think3: combineReducers({
      info: Think3InfoReducer,
      tags: Think3TagsReducer,
      list: Think3ListReducer,
      cities: Think3CitiesReducer,
    }),
    think3Details: Think3DetailsReducer,
    blog: combineReducers({
      info: BlogInfoReducer,
      list: BlogListReducer,
      tags: BlogTagsReducer,
    }),
    blogDetails: BlogDetailsReducer,
    contact: ContactPageReducer,
    search: SearchReducer,
    privacyPolicy: PrivacyPolicyReducer,
  }),
  appInfo: AppInfoReducer,
  formSubscribe: FormSubscribeReducer,
  formCv: FormCvReducer,
  pageMeta: PageMetaReducer,
  formPopup: FormPopupReducer,
  formApplication: FormApplicationReducer,
  formQuiz: FormQuizReducer,
};

export default reducers;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
It’s small application😰 (some names replaced)





&lt;p&gt;&lt;strong&gt;A Challenge of Duplication:&lt;/strong&gt;&lt;br&gt;
Let's be candid—have you ever sought a solution that facilitates the concurrent use of components connected to a store? Have you faced the task of running a connected component multiple times across various pages📑 in your React app or screens in React Native? As you survey your app, you might find the state tree🌴🌴🌴 growing unwieldy, leading to complex code (as demonstrated above). While alternate libraries could potentially address this, I wanted a different solution—one that aligned with the class-based approach that Mobx employs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faywa8mhb95q2wkhd1mjj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faywa8mhb95q2wkhd1mjj.png" alt="State tree problem image" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;
Try to run same page twice, which connected to one state tree node



&lt;p&gt;&lt;strong&gt;Embracing Mobx's Strengths:&lt;/strong&gt;&lt;br&gt;
I've always been drawn✍️ to Mobx's class-based methodology. The advantages offered by classes are difficult to ignore, especially when it comes to business logic and state management. However, a curious cycle emerges—while attempting to streamline one library's functionality, we often find ourselves introducing another, and then another. This chain of dependencies complicates development, requiring mastery of multiple tools and their nuances. Furthermore, onboarding new developers to this "monster"🐙 can be a daunting task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yn839ifcalwc3cdim9j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yn839ifcalwc3cdim9j.png" alt="Proble with documentation image" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;
Try to write app with new state management library




&lt;p&gt;&lt;strong&gt;The Quest for Centralization:&lt;/strong&gt;&lt;br&gt;
Although Mobx's documentation showcases rudimentary store usage examples, it becomes apparent that a centralized approach is missing. Interactions between stores and certain debugging tools may feel reminiscent of Redux—an acquaintance many of us share. This lack of seamless integration and default code splitting options is evident upon deeper🪔 exploration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/**
 * Example redux
 */

/**
 * Action types
 */
enum EXAMPLE_ACTION_TYPE {
  EXAMPLE_USER_GET = 'EXAMPLE_USER_GET',
  EXAMPLE_USER_GET_SUCCESS = 'EXAMPLE_USER_GET_SUCCESS',
  EXAMPLE_USER_GET_ERROR = 'EXAMPLE_USER_GET_ERROR',
}

/**
 * Action creators
 */

const getUser = (): IAction&amp;lt;EXAMPLE_ACTION_TYPE&amp;gt; =&amp;gt; ({
  type: EXAMPLE_ACTION_TYPE.EXAMPLE_USER_GET,
  payload: {},
});

const getUserSuccess = (user: Record&amp;lt;string, any&amp;gt;): IAction&amp;lt;EXAMPLE_ACTION_TYPE&amp;gt; =&amp;gt; ({
  type: EXAMPLE_ACTION_TYPE.EXAMPLE_USER_GET_SUCCESS,
  payload: { user },
});

const getUserError = (message: string): IAction&amp;lt;EXAMPLE_ACTION_TYPE&amp;gt; =&amp;gt; ({
  type: EXAMPLE_ACTION_TYPE.EXAMPLE_USER_GET_ERROR,
  payload: { message },
});

/**
 * Reducer
 */

const initState = {
  fetching: false,
  error: null,
  result: null,
};

const reducer = (
  state = initState,
  { type, payload }: IAction&amp;lt;EXAMPLE_ACTION_TYPE&amp;gt; = {},
): IAppInfoState =&amp;gt; {
  switch (type) {
    case EXAMPLE_ACTION_TYPE.EXAMPLE_USER_GET:
      return { ...initState, fetching: true };

    case EXAMPLE_ACTION_TYPE.EXAMPLE_USER_GET_ERROR:
      return { ...initState, error: payload.message };

    case EXAMPLE_ACTION_TYPE.EXAMPLE_USER_GET_SUCCESS:
      return { ...initState, result: payload.user };

    default:
      return { ...state };
  }
};

/**
 * Saga
 */

function* getUserSaga(): SagaIterator {
  try {
    // axios request
    const { data } = yield call(() =&amp;gt; axios.get('/users/123'));

    yield put(getUserSuccess(data));
  } catch (e) {
    yield put(getUserError(e.message));
  }
}

export default [
  takeLatest(EXAMPLE_ACTION_TYPE.EXAMPLE_USER_GET, getUserSaga),
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/**
 * Example Mobx state tree
 */

import { values } from "mobx"
import { types, getParent, flow } from "mobx-state-tree"

export const User = types.model("User", {
  id: types.identifier,
  name: types.string,
})

export const UserStore = types
  .model("UserStore", {
    fetching: false,
    error: null,
    user: types.reference(User),
  })
  .actions((self) =&amp;gt; {
    function setIsFetching(fetching) {
      self.fetching = fetching
    }

    function setUser(user) {
      self.user = user;
    }

    function setError(error) {
      self.error = error;
    }

    function getUser() {
      try {
        setIsFetching(true);
        const { data } = await axios.get("/users/123")
        setUser(data);
        setIsFetching(false)
      } catch (err) {
        setError("Failed to load user")
      }
    })

    return {
      getUser,
      setUser
    }
  })
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { makeObservable, observable, action } from "mobx"

interface IUser {
  id: number;
  name: string;
}

class UserStore {
  user: IUser | null = null;
  fetching = false;
  error: string | null = null;

  constructor() {
    makeObservable(this, {
      user: observable,
      fetching: observable,
      error: observable,
      setIsFetching: action.bound,
      setError: action.bound,
      setUser: action.bound,
    })
  }

  setIsFetching(fetching: boolean) {
    this.fetching = fetching;
  }

  setError(error: string | null) {
    this.error = error;
  }

  setUser(user) {
    this.user = user;
  }

  getUser = async () =&amp;gt; {
    this.setIsFetching(true);

    try {
      const {data} = await axios.get("/users/123")
      this.setUser(data);
    } catch (e) {
      this.setError("Failed to load user")
    } finally {
      this.setIsFetching(false);
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Introducing React Mobx Manager:&lt;/strong&gt;&lt;br&gt;
Enter the solution: &lt;a href="https://github.com/Lomray-Software/react-mobx-manager" rel="noopener noreferrer"&gt;React Mobx Manager&lt;/a&gt;. Picture this as a singleton—an information repository housing details about all instantiated stores, their contexts, and the linked component names. With this approach, you sidestep the need to build and configure an entire state tree from scratch. Instead, you create dedicated stores for each component, only as necessary. Furthermore, accessing a pre-existing store from another store becomes a breeze🌬💧. The need for complex code splitting is diminished through clever store techniques that mimic React context functionality. You can even concurrently mount identical pages or screens while retaining state integrity. For those interested, a Reactotron plugin is available, and work on browser🌐 extensions is underway.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visualizing the Concept:&lt;/strong&gt;&lt;br&gt;
To illustrate this concept visually, consider the following diagram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1jzfb76d9srh3iyq1f1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1jzfb76d9srh3iyq1f1.png" alt="How Mobx Manager works image" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;
Mobx Store Manager idea




&lt;p&gt;First we need to create a manager and wrap our application in a context (entrypoint src/index.tsx)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import ReactDOM from 'react-dom/client';
import { Manager, StoreManagerProvider } from '@lomray/react-mobx-manager';
import User from './user';

const storeManager = new Manager();

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);

root.render(
  &amp;lt;React.StrictMode&amp;gt;
    &amp;lt;StoreManagerProvider storeManager={storeManager} shouldInit fallback={&amp;lt;div&amp;gt;Loading…&amp;lt;/div&amp;gt;}&amp;gt;
      &amp;lt;User /&amp;gt;
    &amp;lt;/StoreManagerProvider&amp;gt;
  &amp;lt;/React.StrictMode&amp;gt;,
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we create a store and connect it to the component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import type { FC } from 'react';
import { makeObservable, observable } from 'mobx';
import type { IConstructorParams, StoresType } from '@lomray/react-mobx-manager';
import { withStores } from '@lomray/react-mobx-manager';

class UserStore {
  /**
   * Required only if we don't configure our bundler to keep classnames and function names
   * Default: current class name
   */
  static id = 'user';

  /**
   * You can also enable 'singleton' behavior for global application stores
   * Default: false
   */
  static isSingleton = true;

  /**
   * Our state
   */
  public name = 'Matthew'

  /**
   * @constructor
   */
  constructor(params: IConstructorParams) {
    makeObservable(this, {
     name: observable,
   });
  }
}

/**
 * Define stores for component
 */
const stores = {
 userStore: UserStore
};

/**
 * Support typescript
 */
type TProps = StoresType &amp;lt;typeof stores&amp;gt;;

/**
 * User component
 */
const User: FC&amp;lt;TProps&amp;gt; = ({ userStore: { name } }) =&amp;gt; {
 return (
   &amp;lt;div&amp;gt;{name}&amp;lt;/div&amp;gt;
 )
}

/**
 * Connect stores to component
 */
export default withStores(User, stores);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Done!✅&lt;/p&gt;

&lt;p&gt;I’ll just show how it all looks in the reactotron debugger:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzq1kj6r4l3lki4cc4zyl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzq1kj6r4l3lki4cc4zyl.jpeg" alt="Reactotron mobx manager demo image" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If this has piqued your interest, waste no time in diving🤿 into the mechanics. Allow me to provide you with a practical &lt;a href="https://github.com/Lomray-Software/react-mobx-manager/tree/staging/example" rel="noopener noreferrer"&gt;example&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
React Mobx Manager isn't gunning for any awards. Rather, it's an alternative perspective and a personal choice. Whether you embrace it or not, the decision ultimately rests with you. I genuinely appreciate your time spent on this article and am eagerly open to any ideas or suggestions you may have on this matter.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Vite SSR BOOST: Forging Our Unique Journey in the Realm of React SSR⚡</title>
      <dc:creator>Mikhail Yarmaliuk</dc:creator>
      <pubDate>Thu, 03 Aug 2023 10:55:42 +0000</pubDate>
      <link>https://dev.to/lomray-software/vite-ssr-boost-forging-our-unique-journey-in-the-realm-of-react-ssr-59hm</link>
      <guid>https://dev.to/lomray-software/vite-ssr-boost-forging-our-unique-journey-in-the-realm-of-react-ssr-59hm</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0mt568ush2zzmozf7hwq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0mt568ush2zzmozf7hwq.png" alt="Vite SSR Boost library logo" width="300" height="303"&gt;&lt;/a&gt;&lt;/p&gt;
Develop ⚡charged⚡ server side applications with Vite SSR Boost






&lt;p&gt;Hello there!👋 I'm Mikhail, the Chief Technology Officer👮‍♀️ at &lt;a href="https://lomray.com" rel="noopener noreferrer"&gt;Lomray Software&lt;/a&gt;. Today, I'm excited to share a brief overview of our journey in creating a custom framework tailored for developing React applications with robust Server-Side Rendering (SSR) support. Additionally, I'll be unveiling the outcomes of our endeavors.&lt;/p&gt;

&lt;p&gt;As the adage goes, monumental achievements often originate from humble beginnings. In our scenario, we initially managed a handful of React applications lacking SSR capabilities. Gradually, the need to transition these applications toward server-side rendering emerged. Given that the standard navigation within regular React applications (SPA, CRA) is managed by the react-router library, we embarked on a quest to find a solution enabling seamless deployment of existing apps with minimal adjustments for SSR. Unfortunately, the landscape for SSR solutions within the React ecosystem, especially in conjunction with react-router🛣, was somewhat limited. Next.js, for instance, didn't align with our objectives due to its routing system and specific features. Eventually, we encountered a framework named after.js, which granted us the means to bring our vision to life. However, over time, we encountered the obstacle of React and related libraries undergoing significant updates while after.js remained stagnant. Despite amassing a commendable number of GitHub stars⭐, its development was unfortunately halted.&lt;/p&gt;

&lt;p&gt;Confronted with a dearth of viable alternatives and armed with insights from current trends, we opted to forge our own framework, leveraging cutting-edge technologies to address prevailing challenges. It's important to acknowledge our appreciation for Next.js and the Vite SSR Plugin, both of which offer an exceptional SSR development experience. Regrettably, their routing systems fell short of our expectations. Our chief aim was to facilitate a seamless transition from a standard React application to SSR (and vice versa), requiring minimal modifications. The ultimate goal was for the resultant application to be deployable in both SSR and SPA modes.&lt;/p&gt;

&lt;p&gt;Allow me to introduce the &lt;a href="https://github.com/Lomray-Software/vite-ssr-boost" rel="noopener noreferrer"&gt;Vite SSR BOOST&lt;/a&gt;🔋. Originally conceptualized as a plugin, it organically matured into a comprehensive library.&lt;/p&gt;

&lt;p&gt;🔑Key highlights of Vite SSR BOOST:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flexibility for developing applications as SSR or SPA (CRA).&lt;/li&gt;
&lt;li&gt;Effortless toggling between SSR and SPA modes at any point.&lt;/li&gt;
&lt;li&gt;Streamlined building process with no need for SSR or SPA-specific adjustments.&lt;/li&gt;
&lt;li&gt;Seamlessly integrated react-router for streamlined navigation.&lt;/li&gt;
&lt;li&gt;Harnessing the full potential of Vite's capabilities.&lt;/li&gt;
&lt;li&gt;Native support for rendering to a stream (rendertopipeablestream).&lt;/li&gt;
&lt;li&gt;Full compatibility with Suspense.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is notable is that having minimal knowledge in Node.js and React Router is sufficient. Here’s a brief example of an application page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Suspense} from '@lomray/consistent-suspense';
import type { FCRoute } from '@lomray/vite-ssr-boost/interfaces/fc-route';
import { Link, useLoaderData } from 'react-router-dom';
import UserPlaceholder from './components/placeholder';
import User from './components/user';

interface ILoaderData {
  userIds: string[];
}

/**
 * Just simple page which render short info about 3 users by id's
 */
const Details: FCRoute = () =&amp;gt; {
  const { userIds } = useLoaderData() as ILoaderData;

  return (
    &amp;lt;&amp;gt;
      &amp;lt;p&amp;gt;
        Header
      &amp;lt;/p&amp;gt;
      &amp;lt;p&amp;gt;
        Load users for id's: {userIds.join(', ')}
      &amp;lt;/p&amp;gt;
      &amp;lt;div&amp;gt;
        &amp;lt;Suspense fallback={&amp;lt;UserPlaceholder count={2} /&amp;gt;}&amp;gt;
          &amp;lt;&amp;gt;
            &amp;lt;Suspense.NS&amp;gt;
              &amp;lt;User userId="user-1" /&amp;gt;
            &amp;lt;/Suspense.NS&amp;gt;
            &amp;lt;Suspense.NS&amp;gt;
              &amp;lt;User userId="user-3" /&amp;gt;
            &amp;lt;/Suspense.NS&amp;gt;
          &amp;lt;/&amp;gt;
        &amp;lt;/Suspense&amp;gt;
        &amp;lt;Suspense fallback={&amp;lt;UserPlaceholder /&amp;gt;}&amp;gt;
          &amp;lt;User userId="user-2" /&amp;gt;
        &amp;lt;/Suspense&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;p&amp;gt;
        Footer
      &amp;lt;/p&amp;gt;
    &amp;lt;/&amp;gt;
  );
};

/**
 * Just example (react-router API)
 */
Details.loader = (): ILoaderData =&amp;gt; {
  const userIds = ['user-1', 'user-2', 'user-3'];

  return { userIds };
};

export default Details;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Certainly, our journey encountered significant challenges along the way. However, in the spirit of the adage, "what doesn't kill you, makes you stronger." Instead of overwhelming you with a multitude of words, I'm thrilled to present a &lt;a href="https://github.com/Lomray-Software/vite-template" rel="noopener noreferrer"&gt;demo repository&lt;/a&gt; showcasing an application where, alongside the framework itself, we've successfully tackled several related development issues.&lt;/p&gt;

&lt;p&gt;We're eager to hear your thoughts and welcome any feedback you may have. Your input serves as a tremendous motivator for us. Thank you for your valuable attention.&lt;/p&gt;

</description>
      <category>react</category>
      <category>vite</category>
      <category>ssr</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
