---
title: "Usescorm"
description: "A React hook over the SCORM run-time API, distributed on npm as @blocdigital/usescorm. useScorm({ version: '1.2' }) finds the API object, initialises the session, and returns an instance exposing get, set, commit and terminate alongside a small event emitter. It handles completion status and exit mode automatically by default, and auto-commits on change unless you turn that off."
canonical_url: "https://scorm-tools.com/tools/usescorm"
last_updated: "2026-10-31T10:22:03.595Z"
---

A React hook over the SCORM run-time API, distributed on npm as `@blocdigital/usescorm`. `useScorm({ version: '1.2' })` finds the API object, initialises the session, and returns an instance exposing get, set, commit and terminate alongside a small event emitter. It handles completion status and exit mode automatically by default, and auto-commits on change unless you turn that off.

The part worth noticing is the typing. Rather than accepting arbitrary strings, the CMI data model elements for 1.2 and 2004 are enumerated as union types, and the generic resolves to the intersection of both when the version is set to `auto`. In a TypeScript course build that turns a whole class of silent failure — a mistyped element name returning an empty string at run time — into a compile error.

It suits React-built courses and course players. It is no help to anyone not using React, and it does no packaging: you still need a packager to emit the manifest and zip.

On maintenance, be realistic about scale. This is a single agency's library at version 0.2.3, last released February 2025, with single-figure stars and no visible outside contributors. The code is short and readable enough to audit in an afternoon, which is the honest basis on which to depend on it.
