@forgeframework/react-core
v0.3.0
Published
The foundational React library for the Forge Framework.
Maintainers
Readme
@forgeframework/react-core
The foundational React library for the Forge Framework.
Part of the Forge Framework — a TypeScript framework for backend microservices and web applications.
Installation
npm install @forgeframework/react-coreUsage
import { ForgeApp, useAsync, useMounted, ForgeErrorBoundary } from '@forgeframework/react-core';
const App = ForgeApp({
providers: [ThemeProvider, AuthProvider],
errorBoundary: { fallback: ErrorPage },
ssr: { mode: 'ssr', streaming: true },
});
function UserProfile({ userId }: { userId: string }) {
const mounted = useMounted();
const { data, loading, error } = useAsync(() => fetchUser(userId), [userId]);
if (loading) return <Skeleton />;
if (error) return <ErrorMessage error={error} />;
return <ProfileCard user={data} />;
}Documentation
Full API reference and guides: https://carbonforge.io/framework/docs/web/react-core
(Documentation site launching soon.)
License
MIT © Carbon Forge
