Gamification Points

Integrate the StreamLayerSDKPoints component to display gamification points in your React application, rewarding user engagement with interactive content.

Integrating Points with StreamLayer SDK

Overview

The StreamLayerSDKPoints component allows you to integrate gamification points into your React application. This component wraps the StreamLayerPoints class from the StreamLayer SDK.

Usage

Step-by-Step Guide

  1. Import Required Components
  import { StreamLayerProvider, StreamLayerSDKReact, StreamLayerSDKPoints } from '@streamlayer/react';
  1. Wrap Your Application withStreamLayerProvider
  const providerProps = {
    sdkKey: 'your-sdk-key',
    // Add other provider props as needed
  };

  export const Main = () => (
    <StreamLayerProvider {...providerProps}>
      {/* Place StreamLayerSDKPoints component inside StreamLayerProvider */}
      <StreamLayerSDKPoints />

      {/* Place StreamLayerSDKReact component independently if needed */}
      <StreamLayerSDKReact />
    </StreamLayerProvider>
  );

Notes

  • Ensure both StreamLayerSDKPoints and StreamLayerSDKReact components are wrapped inside StreamLayerProvider.
  • The StreamLayerSDKPoints component can be placed anywhere within your app to display points.

Related