reactfire icon indicating copy to clipboard operation
reactfire copied to clipboard

SuspenseWithPerf fails with NextJS (`ReferenceError: performance is not defined`)

Open catrawalkar opened this issue 4 years ago • 3 comments

Version info

React:

Firebase:

ReactFire:

Other (e.g. Node, browser, operating system) (if applicable):

Test case

Steps to reproduce

I tried to follow all the exact code in Example. When I use SuspenseWithPerf, I get following error:


ReferenceError: performance is not defined

What am I possibly doing wrong? Can someone help me?

Expected behavior

Actual behavior

catrawalkar avatar Jan 20 '21 10:01 catrawalkar

Screenshot 2021-01-20 161259

catrawalkar avatar Jan 20 '21 10:01 catrawalkar

P.S I am using Next JS. Is there any setting that I have to do explicitly?

catrawalkar avatar Jan 20 '21 12:01 catrawalkar

SuspenseWithPerf relies on the browser's built-in Performance interface as part of the User Timing API, so I don't think it will work with Next.JS's server-renderer right now.

jhuleatt avatar Apr 29 '21 16:04 jhuleatt