
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@vyuh/react-core
Advanced tools
The core foundation for building modular, CMS-driven React applications
Website • Documentation • GitHub
@vyuh/react-core is the foundation of the Vyuh platform for CMS-driven React
applications. It provides a robust architecture for building modular,
feature-rich applications with a focus on:
# Using npm
npm install @vyuh/react-core
# Using yarn
yarn add @vyuh/react-core
# Using pnpm
pnpm add @vyuh/react-core
Features are the building blocks of your application. Each feature is a self-contained module that can:
Plugins extend the core functionality of the platform:
The content system provides a structured way to:
The Vyuh ecosystem includes several packages that work together:
| Package | Description |
|---|---|
@vyuh/react-core | Core platform and architecture |
@vyuh/react-extension-content | Content management system |
@vyuh/react-feature-system | System-level features and components |
@vyuh/react-plugin-content-provider-sanity | Sanity.io content provider |
import { VyuhProvider, PluginDescriptor } from '@vyuh/react-core';
import { DefaultContentPlugin } from '@vyuh/react-extension-content';
import { SanityContentProvider } from '@vyuh/react-plugin-content-provider-sanity';
import { feature as systemFeature } from '@vyuh/react-feature-system';
// Configure your content provider
const contentProvider = new SanityContentProvider({
projectId: 'your-project-id',
dataset: 'production',
perspective: 'published',
useCdn: true,
});
// Configure plugins
const plugins = new PluginDescriptor({
content: new DefaultContentPlugin(contentProvider),
});
// Define your features
const getFeatures = () => [
systemFeature,
// Your custom features
];
// Set up your application
function App() {
return (
<VyuhProvider features={getFeatures} plugins={plugins}>
<YourApp />
</VyuhProvider>
);
}
Vyuh works with your preferred routing solution. Here's an example with Next.js:
import { RouterProvider } from './components/router-provider';
import { VyuhProvider } from '@vyuh/react-core';
import { NextNavigationPlugin } from './plugins/next-navigation-plugin';
// Configure plugins with navigation
const plugins = new PluginDescriptor({
content: new DefaultContentPlugin(contentProvider),
navigation: new NextNavigationPlugin(),
});
function App({ children }) {
return (
<VyuhProvider features={getFeatures} plugins={plugins}>
<RouterProvider>{children}</RouterProvider>
</VyuhProvider>
);
}
And the router provider component:
import { NextNavigationPlugin } from './plugins/next-navigation-plugin';
import { useVyuh } from '@vyuh/react-core';
import { useRouter } from 'next/navigation';
import { useEffect, useRef } from 'react';
export function RouterProvider({ children }) {
const router = useRouter();
const { plugins } = useVyuh();
const routerInitialized = useRef(false);
useEffect(() => {
if (
plugins.navigation instanceof NextNavigationPlugin &&
!routerInitialized.current
) {
(plugins.navigation as NextNavigationPlugin).setRouter(router);
routerInitialized.current = true;
}
}, [router, plugins.navigation]);
return <>{children}</>;
}
Features are the building blocks of your application:
import { FeatureDescriptor } from '@vyuh/react-core';
import {
ContentExtensionBuilder,
ContentExtensionDescriptor,
} from '@vyuh/react-extension-content';
import { Command } from 'lucide-react';
import React from 'react';
// Import your content descriptors and builders
import { MyCardDescriptor } from './content/card/card-descriptor';
import { MyCardContentBuilder } from './content/card/card-builder';
export const myFeature = new FeatureDescriptor({
name: 'my-feature',
title: 'My Feature',
description: 'A custom feature for my application',
icon: <Command />, // Using Lucide icon
// Extensions provided by this feature
extensions: [
new ContentExtensionDescriptor({
contents: [
new MyCardDescriptor(),
// Other content descriptors
],
contentBuilders: [
new MyCardContentBuilder(),
// Other content builders
],
// Optional: register actions and conditions
actions: [
// Action type descriptors
],
conditions: [
// Condition type descriptors
],
}),
// Other extension descriptors
],
// Initialization logic
init: async () => {
console.log('My feature initialized');
},
});
Access platform features and plugins from anywhere in your application:
import { useVyuh } from '@vyuh/react-core';
function MyComponent() {
const { features, plugins } = useVyuh();
// Access content plugin
const contentPlugin = plugins.content;
// Render content
return (
<div>
{contentPlugin.render({
_type: 'myContentType',
title: 'Hello World',
// ...other content properties
})}
</div>
);
}
We welcome contributions to the Vyuh platform! Please see our contributing guidelines for more information.
MIT © Vyuh Technologies
FAQs
The core package for the Vyuh Platform.
The npm package @vyuh/react-core receives a total of 1 weekly downloads. As such, @vyuh/react-core popularity was classified as not popular.
We found that @vyuh/react-core 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.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.