API
플러그인
plugin-devtools

@stackflow/plugin-devtools

이 플러그인은 Stackflow Devtools의 데이터 저장 레이어로 사용돼요.

설치

npm install @stackflow/plugin-devtools

사용법

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 { devtoolsPlugin } from "@stackflow/plugin-devtools";
import { config } from "./stackflow.config";
import { MyHome } from "./MyHome";
import { MyArticle } from "./MyArticle";
 
const { Stack } = stackflow({
  config,
  components: {
    MyHome,
    MyArticle,
  },
  plugins: [
    devtoolsPlugin(),
    // ...
  ],
});