userbase
userbase copied to clipboard
SSR Support
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
.