refactor: remove vue-rx dependency

This commit is contained in:
Andrew Bastin
2021-08-12 13:44:10 +05:30
parent 971b35a252
commit c273ded97d
24 changed files with 238 additions and 234 deletions

View File

@@ -5,19 +5,23 @@
</AppSection>
</template>
<script>
<script lang="ts">
import { computed, defineComponent } from "@nuxtjs/composition-api"
import { useReadonlyStream } from "~/helpers/utils/composables"
import { restResponse$ } from "~/newstore/RESTSession"
export default {
subscriptions() {
export default defineComponent({
setup() {
const response = useReadonlyStream(restResponse$, null)
const loading = computed(
() => response.value === null || response.value.type === "loading"
)
return {
response: restResponse$,
response,
loading,
}
},
computed: {
loading() {
return this.response === null || this.response.type === "loading"
},
},
}
})
</script>