Skip to content

Commit

Permalink
Try effector 23
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkamyshev committed Nov 22, 2023
1 parent 8ab0452 commit b417894
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 26 deletions.
4 changes: 2 additions & 2 deletions apps/website/docs/web-api/media_query.live.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import { trackMediaQuery } from '@withease/web-api';
import { createEvent } from 'effector';
import { useStore } from 'effector-vue/composition';
import { useUnit } from 'effector-vue/composition';
import { onMounted } from 'vue';
const appStarted = createEvent();
Expand All @@ -10,7 +10,7 @@ const mq = trackMediaQuery('(max-width: 320px)', {
setup: appStarted,
});
const matchesSmall = useStore(mq.$matches);
const matchesSmall = useUnit(mq.$matches);
onMounted(appStarted);
</script>
Expand Down
5 changes: 2 additions & 3 deletions apps/website/docs/web-api/network_status.live.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<script setup>
import { trackNetworkStatus } from '@withease/web-api';
import { createEvent } from 'effector';
import { useStore } from 'effector-vue/composition';
import { useUnit } from 'effector-vue/composition';
import { onMounted } from 'vue';
const appStarted = createEvent();
const { $online, $offline } = trackNetworkStatus({ setup: appStarted });
const online = useStore($online);
const offline = useStore($offline);
const [online, offline] = useUnit([$online, $offline]);
onMounted(appStarted);
</script>
Expand Down
4 changes: 2 additions & 2 deletions apps/website/docs/web-api/page_visibility.live.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup>
import { trackPageVisibility } from '@withease/web-api';
import { createEvent, createStore } from 'effector';
import { useStore } from 'effector-vue/composition';
import { useUnit } from 'effector-vue/composition';
import { onMounted } from 'vue';
const appStarted = createEvent();
Expand All @@ -12,7 +12,7 @@ const $history = createStore([])
.on(visible, (state) => [...state, { at: new Date(), action: 'visible' }])
.on(hidden, (state) => [...state, { at: new Date(), action: 'hidden' }]);
const history = useStore($history);
const history = useUnit($history);
onMounted(appStarted);
</script>
Expand Down
4 changes: 2 additions & 2 deletions apps/website/docs/web-api/preferred_languages.live.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup>
import { trackPreferredLanguages } from '@withease/web-api';
import { createEvent } from 'effector';
import { useStore } from 'effector-vue/composition';
import { useUnit } from 'effector-vue/composition';
import { onMounted } from 'vue';
const appStarted = createEvent();
const { $languages } = trackPreferredLanguages({ setup: appStarted });
const languages = useStore($languages);
const languages = useUnit($languages);
onMounted(appStarted);
</script>
Expand Down
5 changes: 2 additions & 3 deletions apps/website/docs/web-api/screen_orientation.live.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<script setup>
import { trackScreenOrientation } from '@withease/web-api';
import { createEvent } from 'effector';
import { useStore } from 'effector-vue/composition';
import { useUnit } from 'effector-vue/composition';
import { onMounted } from 'vue';
const appStarted = createEvent();
const { $type, $angle } = trackScreenOrientation({ setup: appStarted });
const type = useStore($type);
const angle = useStore($angle);
const [type, angle] = useUnit([$type, $angle]);
onMounted(appStarted);
</script>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@typescript-eslint/parser": "5.62.0",
"@vitest/ui": "0.34.4",
"bytes-iec": "^3.1.1",
"effector": "^22.8.6",
"effector-vue": "^22.2.0",
"effector": "23.0.0-rc.6",
"effector-vue": "23.0.0-rc.6",
"eslint": "8.46.0",
"glob": "^8.0.3",
"i18next": "23.0.0",
Expand Down
24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b417894

Please sign in to comment.