The core client works without React. Create a widget and mount it to any element or selector:
import {createMindWidget} from '@ulesson-education/mind-sdk';
import '@ulesson-education/mind-sdk/styles';
const widget = createMindWidget({
authCookieKey: 'session',
lmsContext: {pageType: 'dashboard'},
});
widget.mount('#mind-root'); // or pass an HTMLElement
widget.on('stateChange', (from, to) => console.log(from, '→', to));
widget.transitionTo('engage');
// teardown
widget.destroy();
The rendered UI is implemented in React internally, so react and react-dom must still be available at runtime even in a vanilla integration.
Other core exports from @ulesson-education/mind-sdk include MindWidget, StateMachine / createStateMachine, ContextEngine / createContextEngine, EventEmitter / createTypedEventEmitter, the HTTP helpers (createHttpClient, createHttpClientFromConfig, TypedHttpClient, request), and the VERSION constant. See the API reference.