sling-web-component-sdk-connect

Sling SDK Connect

Usage no npm install needed!

<script type="module">
  import slingWebComponentSdkConnect from 'https://cdn.skypack.dev/sling-web-component-sdk-connect';
</script>

README

sling-web-component-sdk-connect

Install

npm install sling-web-component-sdk-connect

Tag

  <sling-sdk-connect></sling-sdk-connect>

Attributes and properties

Name Type Default Values ReflectToAttribute Observer callSdk
store Function
state Object
dispatch Function
subscribe Function

Description

Name Description
store Receives a Redux Store.
state The current Store state. The same as calling getState() on Redux.
dispatch Disables the button, preventing the user from clicking and changing their style to dimmed
subscribe A pre-configured value for size of button, can be normal, small or big.

Events

This component does not emit events.

Examples

<sling-sdk-connect></sling-sdk-connect>
import { MyReduxStore } from './my-redux-store.js';
const sdkStore = document.querySelector('sling-sdk-connect');
sdkStore.store = MyReduxStore;
console.log(sdkStore.state);