import { createContextId, useContext } from "@builder.io/qwik";
import type { BuilderContextInterface } from "@builder.io/sdk-qwik/types/src/context/types";
const BuilderContextId = createContextId<BuilderContextInterface>("Builder");
export function useBuilderContext() : BuilderContextInterface {
return useContext(BuilderContextId);
}
With this I can access the BuilderContext via QWIK useContext.
However, I could not find a way to import the ContextId from the SDK, so I had to recreate it with the same tag (“Builder”), which works, but is not very robust.
Unfortunately, this forum channel is only intended for questions about the use of the Builder.io Visual Editor and its related plans and pricing.
However, Our Open source development team would love to help you take advantage of Qwik to boost your site performance scores further and provide more value to your implementation with Builder.
To reach out to the Qwik open source project teams, please head over to our Discord and join the discussion there.