You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an existing Next.js or React app, install @y-sweet/react as follows: npm i @y-sweet/react
A different thing I tried was using the ys:// link from y-sweet serve as a value in the ClientToken type. Maybe there's an opportunity for a defensive check and throw for the end-user.
Thanks Cole. I like the idea of adding the defensive check.
And I do think it makes sense to expose ClientToken from @y-sweet/react. We’re currently refactoring the Vanilla JS client out of the React lib to better support non-React frameworks (#128), so I'll aim to re-export ClientToken either as part of that refactor or once the dust settles on it.
I think it would make sense to export this type, so I can do a
const token = useMemo((): ClientToken => ({ ... }), [...])
in my provider.I can work around this by also adding the sdk package & importing the type from there.
The text was updated successfully, but these errors were encountered: