0.3.0 • Published 8 months ago

@peassoft/mnr-web-topline v0.3.0

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

@peassoft/mnr-web-topline

Topline widget for mem'n'rev web applications.

Usage Example

import { useCallback } from 'react';
import WebTopline, {
  ToplineService,
  ToplineUser,
} from '@peassoft/mnr-web-topline';

export default function Topline(): JSX.Element {
  const handleReady = useCallback(
    async(toplineService: ToplineService, toplineUser: ToplineUser | null) => {
      toplineService
        .on('userChange', user => {
          //
        })
        .on('logout', () => {
          //
        })
        .on('syncNotification', syncId => {
          //
        });

      // Use toplineService and toplineUser somehow else
    },
    [],
  );

  return (
    <WebTopline
      onReady={handleReady}
      onError={(err: Error) => {/* Handle the error */}}
    />
  );
}

API Reference

Refer to the file index.d.ts.

0.3.0

8 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.0

1 year ago