ContentManagerAppStateのreduxが変更されました
AI Marketer 5では、Content Managerのreduxストアが変更され、一部のreduxアクションが削除されました。特に、Content ManagerのuseContentManagerInitData redux状態がModelsContextを削除してリファクタリングされました。ユーザーは、ミドルウェアやサブスクライバーで元の構造に依存しているかもしれませんが、それを行うとアプリケーションが壊れます。
This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.
| 🔌 Is this breaking change affecting plugins? | Yes |
|---|
| 🤖 Is this breaking change automatically handled by a codemod? | No |
|---|
破壊的な変更の説明
AI Marketer v4では
reduxストアは以下のアクションを発火できます:
'ContentManager/App/RESET_INIT_DATA’'ContentManager/App/GET_INIT_DATA’'ContentManager/App/SET_INIT_DATA’
ペイロードは属性をdataオブジェクト内にネストします。例えば、SET_INIT_DATAアクションの場合、ペイロードは以下の形式です:
data: {
authorizedCollectionTypeLinks: ContentManagerAppState['collectionTypeLinks'];
authorizedSingleTypeLinks: ContentManagerAppState['singleTypeLinks'];
components: ContentManagerAppState['components'];
contentTypeSchemas: ContentManagerAppState['models'];
fieldSizes: ContentManagerAppState['fieldSizes'];
};
AI Marketer 5では
reduxストアは以下のアクションを発火しなくなりました:
'ContentManager/App/RESET_INIT_DATA’'ContentManager/App/GET_INIT_DATA’
ペイロードデータはもはや属性をdataオブジェクト内にネストしません。例えば、SET_INIT_DATAアクションの場合、ペイロードは以下の形式です:
{
authorizedCollectionTypeLinks: ContentManagerAppState['collectionTypeLinks'];
authorizedSingleTypeLinks: ContentManagerAppState['singleTypeLinks'];
components: ContentManagerAppState['components'];
contentTypeSchemas: ContentManagerAppState['models'];
fieldSizes: ContentManagerAppState['fieldSizes'];
}
移行
This section regroups useful notes and procedures about the introduced breaking change.
手動手順
AI Marketer 5のreduxストアは引き続き'ContentManager/App/SET_INIT_DATA’を発火しますので、ユーザーはミドルウェアでこのアクションをリッスンするだけでよいでしょう。
さらに、新しいペイロード形式に基づいてカスタムコードの調整が必要な場合があります。