#Anyone tried connecting rainbowkit/wagmi to astro?

8 messages · Page 1 of 1 (latest)

vast moss
#

When I add client:load to a component that holds all the config providers it gives me the following:
If I remove that the connect button is there but hidden/ w/opacity.

Cyclic reference detected while serializing props for <Connector client:load>!

Cyclic references cannot be safely serialized for client-side usage. Please remove the cyclic reference.

jade anchorBOT
#

Hi @vast moss. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Hmm, I don't know enough to give you a confident answer yet. The extracts provided do not contain specific information about handling cyclic references in Astro. However, the error message suggests that there is a cyclic reference in your props which cannot be serialized for client-side usage. You might need to revise your component structure or the way you're passing props to avoid this issue.

For more information, you can refer to the Astro Documentation (https://docs.astro.build).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@vast moss kapa.ai is still learning and improving, please let us know how it did by reacting below

vast moss
#

When I add client:load to my connector I get a build error.

---
import "@rainbow-me/rainbowkit/styles.css";
import { getDefaultWallets, RainbowKitProvider } from "@rainbow-me/rainbowkit";
import { configureChains, createConfig, WagmiConfig } from "wagmi";
import { base, baseGoerli } from "wagmi/chains";
import { publicProvider } from "wagmi/providers/public";
import Layout from "../layouts/Layout.astro";
import Connector from "../components/Connector";

const { chains, publicClient } = configureChains(
  [base, baseGoerli],
  [publicProvider()]
);

const { connectors } = getDefaultWallets({
  appName: "frontpage",
  projectId: import.meta.env.PUBLIC_WALLET_CONNECT_PROJECT_ID,
  chains,
});

const wagmiConfig = createConfig({
  autoConnect: true,
  connectors,
  publicClient,
});
---

<Layout title="Guestbook" pageKey="guestbook">
  <Connector wagmiConfig={wagmiConfig} chains={chains} client:load />
</Layout>
sinful geyser
vast moss