
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
Reactmos is a small project, primarily a conceptual approach, inspired by [Nuxt Layers](https://nuxt.com/docs/getting-started/layers) for React.
Reactmos is a small project, primarily a conceptual approach, inspired by Nuxt Layers for React.
[!NOTE]
This project is a Work In Progress and currently supports only Single Page Applications (SPA).
See documentation
We provide a CLI to help run the development server and build the final bundle.
Reactmos serves as the core of the application and acts as the entry point for Vite.
This is where you will develop your application and extend other modules.
To create a new module, simply run:
pnpm create reactmos <module-name>
See more in packages/cli/src/types.ts
const moduleConfig: ModuleConfig = {
moduleName: 'module-boilerplate',
/**
* Root component of the application.
* If not provided, Reactmos will use the root component
* from the first extended module that defines one.
* If no extended module provides a root component,
* the default from the entry point will be used.
*/
root: App,
routes: () => {
return [
{
path: '/welcome',
Component: Welcome,
},
];
},
hooks: {
'app:beforeRender': () => {
console.log('Before render')
}
}
}
To extend another module, just add its package name to the extends field in module.config.ts:
export default {
extends: ['module-to-extend']
}
You can also use relative path to other module directory
export default {
extends: ['../module-to-extend']
}
Reactmos provides several lifecycle hooks:
app:afterBoot - Called after the CLI registers all module routes and hooks. Used by the entry point to mount the application.app:init - Called before the entry point retrieves App.tsx, which serves as the root of the application.app:beforeRender - Called after App.tsx is retrieved but before calling render from createRoot.app:afterRender - Called after createRoot executes render.You can use app:afterBoot to create new hooks within your application:
import { hooks } from 'reactmos';
// Register a new hook called 'hello'
hooks.hook('hello', () => {
console.log('Hello, World!');
});
// Call the 'hello' hook
hooks.callHook('hello');
For more details, see hookable.
Reactmos provides a <Pages /> component that represents all registered routes. You can use it in your App.tsx root component.
Reactmos also provides the following functions:
getRoutes - Retrieves all registered routes.getRoot - Returns the App.tsx root component.getExtras(moduleName) - Returns extra configuration in module configspublic directoryFAQs
Reactmos is a small project, primarily a conceptual approach, inspired by [Nuxt Layers](https://nuxt.com/docs/getting-started/layers) for React.
We found that reactmos demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.