RohanNero / block3d

An open-source authentication toolkit designed to streamline access control within Nextjs dapps.
https://block3d.gitbook.io/block3d
GNU General Public License v3.0
1 stars 0 forks source link

Restructure wrapper logic so users can customize their providers #12

Open RohanNero opened 2 days ago

RohanNero commented 2 days ago

Overview

Currently, we use Block3r to wrap user's apps, this component contains a WagmiProvider, a RainbowKitProvider, a QueryClientProvider, and a Block3rContent component. This restricts what the user can do to the providers since they are included in the package and can't be modified by the user. (Unless they are using the git submodule and create a fork).

Solution

We could remove Block3r entirely, rename Block3rContent --> Block3r, and then simply require users to include our additional wrapper with the other three in their app's root.

Or, if this doesn't work with SSR, we could require users add another component to their app that includes the 4 providers and is set to "use client" like scaffold-eth 2 does with their ScaffoldEthAppWithProviders component.