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

Add support for server side rendering #4

Open RohanNero opened 3 weeks ago

RohanNero commented 3 weeks ago

Overview

Currently block3d only works with client side rendering, which can be annoying to the user who then has to specify "use client"; when using it inside a nextjs project. On top of this, it makes it even more difficult to integrate with other React frameworks such as Remix and Gatsby.

Solution

We need to figure out how to add support for SSR and replace browser-only code with server side alternatives.

Start by

  1. testing out the ssr field in the Rainbow kit and Wagmi configs.
  2. replacing client-only code (e.g. window.location.pathname, useEffect)
RohanNero commented 5 days ago

I don't know how to do this.

RohanNero commented 12 hours ago

I think I know how to do this, but will "release" block3d prior to implementing this.