Closed wobsoriano closed 1 week ago
Latest commit: 1235e8d345d5f9926c2fed0c39179f40d2724c6c
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Closing this but it will be tackled in the future at a more relaxing pace.
Description
This PR tackles ECO-4 and aims to share functions that are currently being duplicated by official and community SDKs.
The ff. functions in the PR are present in the React SDK:
loadClerkJsScript
- Duplicated by the ff. community SDKs:Our work-in-progress Clerk SDK approach and requirements requires Clerk to be hotloaded and having this function shared is a no brainer.
deriveState
- While different frameworks have different approaches to SSR, this function is also duplicated across SDKs (Vue, SvelteKit, Astro) and is used to set initial value of a user (data coming from server) even when Clerk is not yet loaded in the client.All the shared functions above will initially be used by the Astro integration and adopted by different SDKs later.
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change