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
FWIW I'm not really fan of this but that's the direction things are heading.
So there are issues when trying to use things like getAttestations() in server components because @coinbase/onchainkit/identity also exports client components.
This should be fixable by separating exports to something like
@coinbase/onchainkit/<module>/core and @coinbase/onchainkit/<module>/react
@coinbase/onchainkit/<module>/core and @coinbase/onchainkit/<module> which exports components
@coinbase/onchainkit/core for all server side functions and @coinbase/onchainkit/<module> for client components
I find the 3rd option more intuitive as a consumer because of the clear distinction.
What's the expected behavior?
No response
What version of the libraries are you using?
0.23.2
The text was updated successfully, but these errors were encountered:
I guess @roushou, there is an interesting question here which is:
is core for all NodeJS stuff, or is more for utils that don't need any other library, like Viem or Wagmi.
I ask this question because I wonder if we should have a import { xyz } from '@coinbase/onchainkit/utils'; which focus on ALL utils, and core is a subset of them.
Describe the bug and the steps to reproduce it
This is related to an issue someone had on Discord https://discord.com/channels/1220414409550336183/1255514874860273708
Currently, module entrypoints export both functions runnable on the server and client components which makes Next.js not happy.
Here's a reproduction https://stackblitz.com/edit/stackblitz-starters-bmjcpd?file=app%2Fpage.tsx
Server components enable to do server-side actions directly inside React components, i.e.
FWIW I'm not really fan of this but that's the direction things are heading.
So there are issues when trying to use things like
getAttestations()
in server components because@coinbase/onchainkit/identity
also exports client components.This should be fixable by separating exports to something like
@coinbase/onchainkit/<module>/core
and@coinbase/onchainkit/<module>/react
@coinbase/onchainkit/<module>/core
and@coinbase/onchainkit/<module>
which exports components@coinbase/onchainkit/core
for all server side functions and@coinbase/onchainkit/<module>
for client componentsI find the 3rd option more intuitive as a consumer because of the clear distinction.
What's the expected behavior?
No response
What version of the libraries are you using?
0.23.2
The text was updated successfully, but these errors were encountered: