From 79575cb5cd481a03488624ba63c54acdad643f73 Mon Sep 17 00:00:00 2001 From: AlexandrHoroshih Date: Tue, 12 Dec 2023 21:44:36 +0700 Subject: [PATCH] Move article to magazine --- apps/website/docs/.vitepress/config.js | 4 ++++ .../usage.md => magazine/migration_from_redux.md} | 4 +++- apps/website/docs/redux-interop/index.md | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) rename apps/website/docs/{redux-interop/usage.md => magazine/migration_from_redux.md} (97%) diff --git a/apps/website/docs/.vitepress/config.js b/apps/website/docs/.vitepress/config.js index 3d4148e5..517b4751 100644 --- a/apps/website/docs/.vitepress/config.js +++ b/apps/website/docs/.vitepress/config.js @@ -123,6 +123,10 @@ export default defineConfig({ text: 'Events in UI-frameworks', link: '/magazine/handle_events_in_ui_frameworks', }, + { + text: 'Migrating from Redux to Effector', + link: '/magazine/migration_from_redux', + } ], }, { diff --git a/apps/website/docs/redux-interop/usage.md b/apps/website/docs/magazine/migration_from_redux.md similarity index 97% rename from apps/website/docs/redux-interop/usage.md rename to apps/website/docs/magazine/migration_from_redux.md index 40c021c5..4acea930 100644 --- a/apps/website/docs/redux-interop/usage.md +++ b/apps/website/docs/magazine/migration_from_redux.md @@ -286,9 +286,11 @@ sendAnalytics(payload); It is safe to do, because the `sendAnalytics(payload)` call here is a full equivalent of the `dispatch(sendAnalyticsEventAction(payload))` and can be used instead of it - the action will still be dispatched by the `reduxInterop.dispatch` under the hood. +In the end Redux, Effector and your UI-framework should all use this event instead of dispatching the action. + #### Move the implementation -After that both Redux, Effector and UI-framework's code can use the same event to handle any analytics events and it is now possible to fully move from a analytics middleware to Effector's model: +Since now all analytics is sent via this event, it is now possible to fully move from a analytics middleware to Effector's model: ```ts // src/shared/analytics/model.ts diff --git a/apps/website/docs/redux-interop/index.md b/apps/website/docs/redux-interop/index.md index f161ecc0..56044e65 100644 --- a/apps/website/docs/redux-interop/index.md +++ b/apps/website/docs/redux-interop/index.md @@ -7,7 +7,7 @@ outline: [2, 3] Minimalistic package to allow simpler migration from Redux to Effector. Also can handle any other usecase, where one needs to communicate with Redux Store from Effector's code. -This is a API reference article, for the Redux -> Effector migration guide [see the "Migrating from Redux to Effector" article](/redux-interop/usage). +This is a API reference article, for the Redux -> Effector migration guide [see the "Migrating from Redux to Effector" article](/magazine/migration_from_redux). ## Installation