Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@escolalms/sdk

Package Overview
Dependencies
Maintainers
0
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@escolalms/sdk

Frontend TS/JS connection to API.

  • 0.6.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
586
increased by423.21%
Maintainers
0
Weekly downloads
 
Created
Source

EscolaLMS Software Development Kit

codecov Maintainability npm npm

The following project contains:

API Documentation

Types

React

For rapid React application development here is list of

Context

Simplest React appliaction consuming Wellms Context API would look like

import React, { useContext } from "react";
import ReactDOM from "react-dom/client";
import { EscolaLMSContextProvider } from "@escolalms/sdk/lib/react/context";

declare global {
  interface Window {
    REACT_APP_API_URL: string;
  }
}

const App = () => {
  const { user, courses, fetchCourses } = useContext(EscolaLMSContext);

  useEffect(() => fetchCourses(), []);

  console.log("current user data", user);

  return (
    <React.Fragment>
      <ul>
        {courses.list.map((course) => (
          <li key={course.id}>{course.title}</li>
        ))}
      </ul>
    </React.Fragment>
  );
};

const API_URL =
  window.REACT_APP_API_URL ||
  (process && process.env && process.env.REACT_APP_PUBLIC_API_URL);

ReactDOM.createRoot(document.getElementById("root") as Element).render(
  <EscolaLMSContextProvider apiUrl={API_URL}>
    <App />
  </EscolaLMSContextProvider>
);

API endpoint calls

List of umi-request based

Keywords

FAQs

Package last updated on 15 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc