Skip to content
Discussion options

You must be logged in to vote

Hello, @solis
As u mentioned, Rabbykit resolves cross wallet conflicts effectively, but based on Svelte, so have some limitations for React.
You cannot use it directly and need to make provider using React.useref

const RabbyProvider = () => {
  const rabbyKitRef = useRef<ReturnType<typeof createModal>>();

  useEffect(() => {
    if (!rabbyKitRef.current) {
      rabbyKitRef.current = createModal({
        chains: supportChains,
        wagmi: config,
        appName: "Test Demo",
        projectId: "58a22d2bc1c793fc31c117ad9ceba8d9",
      });
    }
  }, [config]);

  return (
    <Providers>
      <button
        onClick={() => {
          rabbyKitRef.current?.open();
        }}
      >…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
2 replies
@venuswhispers
Comment options

Answer selected by 0x001828
@0x001828
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants