lumapps-sdk-js
v1.48.0
Published
SDK For LumApps intranet
Downloads
336
Readme
LumApps JavaScript SDK
The Lumapps JavaScript SDK is a lightweight interface to Lumapps for your React components.
Quickstart
Install the SDK with npm:
$ npm install --save lumapps-sdk-js
Import Lumapps Hooks to use them:
import React, { FC, useMemo } from 'react';
import { useCurrentUser } from 'lumapps-sdk-js';
export const HelloWidget: FC = () => {
const { email, fullName } = useCurrentUser();
const { displayLanguage } = useLanguage();
const welcomeMessage = useMemo(() => {
return (
<p>
Hello {fullName}, your email is {email}.
</p>
);
}, [email, fullName]);
return (
<>
{welcomeMessage}
</>
);
};