react-clear-cache
react-clear-cache copied to clipboard
Error in Nesxtjs
I try to use this package in my react/nextjs project but it throws this error: “SyntaxError: Unexpected token < in JSON at position 0”.
import { Index } from "./containers/index";
import styled from "styled-components";
import { useClearCache } from "react-clear-cache";
export const IndexPage= () => {
const { isLatestVersion, emptyCacheStorage } = useClearCache();
return isLatestVersion ? <Index /> : emptyCacheStorage();
}
in my project have the same problem. this component have any problem with nextjs? hope they can help with this error
Hi, thank you for reporting this one. I haven't tested this out with nextjs. Maybe you guys can help to contribute and it would be greatly appreciated for those who are using nextjs too.
the same problem. Someone handled it?