Kong / swrv

Stale-while-revalidate data fetching for Vue

Home Page:https://docs-swrv.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimal reproduction error: Cannot read property 'proxy' of null at useSWRV (use-swrv.ts:159)

mrweiner opened this issue · comments

This project doesn't seem to be working for me at all at the moment. At first I thought it was because I was using the new <script setup> RFC, or trying to use it in beforeMount(), but I'm seeing the error (Uncaught (in promise) TypeError: Cannot read property 'proxy' of null) with a minimal reproduction as well. Any idea what might be going on?

<template>
  Hi!
</template>

<script>
import useSWRV from 'swrv';

export default {
  setup() {
    const { data, error } = useSWRV('https://jsonplaceholder.typicode.com/todos/1');

    return {
      data
    }
  }
}
</script>

can you reproduce with a codesandbox or repo?

I think that this may have been some sort of environment issue because I can't seem to get it to happen again.