4.0.4 • Published 4 years ago

@thewillhuang/scorm-hook v4.0.4

Weekly downloads
17
License
MIT
Repository
github
Last release
4 years ago

usage

import React from "react";
import scormHook from "@thewillhuang/scorm-hook";

const LMS = () => {
  const [state, setState] = scormHook({
    state: {},
    setState: () => {},
    config: {},
  }); // starting state as state, config is an object with methods matching SCORM2004 standards methods visit https://scorm.com/scorm-explained/technical-scorm/run-time/ for more details
  console.log({ state });
  useEffect(() => {
    uploadToServer(state);
  }, [state]);
  return (
    <div>
      <button
        onCLick={() => {
          window.open(url);
        }}
      >
        {"open course"}
      </button>
    </div>
  );
};
4.0.4

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.0.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago