This PR is just a Proof of Concept on what using Clerk UI components in a true SSR way could look like.
There appears to be 3 main hurdles to tackle:
Hooking into Remix's router instead of Clerk's custom router
Building the CSS in a way that importing could import the raw CSS files
Ensuring Context providers and useContext hooks still work
This went as far as possible on the user end without having to change the code on Clerk's end, but the last of these three bullets was the road block that I kept hitting that made me think some changes to the package will be necessary. Additionally, the CSS doesn't load at all, so will need a way to export the related styles as well.
DO NOT MERGE - WILL REMAIN A DRAFT
This PR is just a Proof of Concept on what using Clerk UI components in a true SSR way could look like.
There appears to be 3 main hurdles to tackle:
useContext
hooks still workThis went as far as possible on the user end without having to change the code on Clerk's end, but the last of these three bullets was the road block that I kept hitting that made me think some changes to the package will be necessary. Additionally, the CSS doesn't load at all, so will need a way to export the related styles as well.