userbase icon indicating copy to clipboard operation
userbase copied to clipboard

SSR Support

Open mmmoli opened this issue 3 years ago • 0 comments

Nothing fancy here, just checks for typeof window !== undefined.

I'm building a next.js app in TS and found an example app (in Gatsby) with this:

const userbase = typeof window !== 'undefined' ? require('userbase-js').default : null;

Problem: I loose my return types; everything becomes any.

mmmoli avatar Mar 15 '21 07:03 mmmoli