-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Description
In the current implementation of SDK, presenters are coupled with NextApiResponse. As this is only a type and can't be instantiated, it leaves server-side fetching of data impossible, as well as easily replacing controllers with something like tRPC instead of direct Next.js endpoints.
As a follow up, usecases and usecase factories should be decoupled from IronSession, which would allow get-side-header to work server-side as well.
Motivation
Having components come pre-rendered with data from the server, instead of relying on JS and displaying loading indicators, is beneficial for UX.
This will also make all the usecases reusable for any other needs, including a CLI client.
Change
This should be addressed with as little breaking changes as possible. I propose creating an interface which matches the utilized functionality by presenters.
Additional Information
- The Rucio API needs to be changed.