"use client"; import * as React from "react"; import { UploadButton } from "@uploadthing/react"; export function WithoutSSR() { // False for 3 seconds, true for 1 second, repeating const [loading, setLoading] = React.useState(true); React.useEffect(() => { const intervalId = setInterval( () => { setLoading((prevIsActive) => !prevIsActive); }, loading ? 5000 : 2000, ); return () => { clearInterval(intervalId); }; }, [loading]); return (
Without SSR Plugin {/* @ts-expect-error - using non-public props */}
); } export function WithSSR() { return (
With SSR Plugin {/* @ts-expect-error - using non-public props */}
); }