@stackflow/plugin-renderer-web
활성화 된 액티비티만 스택 상태를 기반으로 렌더링해요. 이 플러그인은 웹 브라우저에서 제공되는 웹 애플리케이션에 사용할 수 있어요.
설치
npm install @stackflow/plugin-renderer-web사용법
stackflow.config.ts
import { defineConfig } from "@stackflow/config";
export const config = defineConfig({
activities: [
{
name: "MyHome",
route: "/",
},
{
name: "MyArticle",
route: "/articles/:articleId",
},
],
});stackflow.ts
import { stackflow } from "@stackflow/react";
import { webRendererPlugin } from "@stackflow/plugin-renderer-web";
import { config } from "./stackflow.config";
import { MyHome } from "./MyHome";
import { MyArticle } from "./MyArticle";
const { Stack } = stackflow({
config,
components: {
MyHome,
MyArticle,
},
plugins: [webRendererPlugin()],
});