0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

storybookにRSCの設定

Posted at

バージョン

  "devDependencies": {
    "next": "14.2.24",
    "@storybook/nextjs": "^8.6.10",
    "@storybook/react": "^8.6.9",
    "storybook": "^8.6.9",
    }

当初の対応

こちらの記事を拝見し、storybook8では.storybook/main.jsの記述は下記にしてました。

const config: StorybookConfig = {
  // 省略
  features: {
    experimentalNextRSC: true,
  },
};
export default config;

この記述から下記のエラーによると、そんなものはないとのことでした。

オブジェクト リテラルは既知のプロパティのみ指定できます。'experimentalNextRSC' は型 '{ argTypeTargetsV7?: boolean | undefined; legacyDecoratorFileOrder?: boolean | undefined; disallowImplicitActionsInRenderV8?: boolean | undefined; experimentalRSC?: boolean | undefined; viewportStoryGlobals?: boolean | undefined; backgroundsStoryGlobals?: boolean | undefined; developmentModeForBuild?: boolean | unde...' に存在しません。

正規の記述

const config: StorybookConfig = {
  // 省略
  features: {
    experimentalRSC: true,
  },
};
export default config;

ちゃんと公式見よう。

参考記事

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?