@smartsoft001/react-stack
@smartsoft001/react-stack installs everything a React application uses: the core packages, the UI library and the CRUD screens.
Install
npm install @smartsoft001/react-stack react react-dom
What it is
It ships no code of its own, only pinned dependencies, so the browser half of the framework arrives at one version with one command: core, the React UI library and the React CRUD screens. React itself is a peer dependency the application installs.
Usage
After installing, wrap the application once in SmartProvider. This one renders every component with the preset look:
import type { ReactNode } from 'react';
import {
createHistoryNavigation,
SmartProvider,
SMART_PRESET_COMPONENTS,
} from '@smartsoft001/react';
// Created once: the adapter listens to the browser history.
const navigation = createHistoryNavigation();
export function AppProviders({ children }: { children: ReactNode }) {
return (
<SmartProvider
language="eng"
navigation={navigation}
fileServiceConfig={{ apiUrl: '/api' }}
{...SMART_PRESET_COMPONENTS}
>
{children}
</SmartProvider>
);
}
API
None of its own. The package is a manifest with pinned dependencies, so what it brings is its whole interface:
| Package |
|---|
@smartsoft001/core |
@smartsoft001/react |
@smartsoft001/crud-shell-react |
Every version is pinned exactly, so the set installs at one version and a release never leaves two of these packages on different ones.
Related packages
@smartsoft001/react documents the provider, the components and the form engine; @smartsoft001/crud-shell-react the generated screens.