hello, how do we add custom react component? I get...
# support-questions-legacy
t
hello, how do we add custom react component? I get this error when trying:
n
Hi @tonyb Can I see the code for what you tried?
t
hi
I call this fn in my form
n
Where do you call
SuperTokens.init
?
t
_app.tsx
Copy code
js
if (typeof window !== 'undefined') {
  // we only want to call this init function on the frontend, so we check typeof window !== 'undefined'
  SuperTokensReact.init(frontendConfig());
}
n
Can I see the imports for
createCode
and
PasswordlessReact
t
form is very simple, onsubmit call the sendotp function with email
n
Also the import for
createCode
t
ah good call
it was importing the web version
n
Ah, changing the import should fix it then
t
yes works 🙂
thank you
n
Happy to help